Re: icons

Posted by ravas on
URL: https://forum.librecad.org/icons-tp5711994p5712004.html

In theory SVG would remove any limitation on custom icon size.

I've been thinking about: https://github.com/LibreCAD/LibreCAD/issues/102
My first thought is to keep using the Qt resource system for default icons.
Then, using my new QMap<QString, QAction*>, I am imagining two possibilities:

1. users could pick a directory and name the files the same as the key string;
then a function walks the directory and analyzes the file names and uses the map to change icon.

2. users could pick a .txt file that maps the key string to the icon path
DrawCircle, c:\icons\circles.png
DrawLine, ...

#1 seems easier to use. If you want to change an icon you just replace the file in your folder.
#2 doesn't require files to be in the same folder; and the file name can be anything
so you don't need to worry about overwritting and keeping backups of the previous version.