LibreCAD / LibreCAD_3

LibreCAD 3 is a next generation 2D CAD application written to be modular, with a core independent from GUI toolkits. Scripting is possible with Lua.
http://librecad.org
Other
314 stars 103 forks source link

Dark theme icons support #364

Open deric opened 4 years ago

deric commented 4 years ago

In order to make icons visible on dark background, it's necessary to modify code for loading icons, instead of:

_editIcon = QIcon(":/icons/layeredit");

use something like:

_editIcon = QIcon::fromTheme("layer-edit", QIcon(":/icons/layeredit.svg"))

In case the icon is not found in any of searched paths:

qDebug() << QIcon::themeSearchPaths();

the fallback (current default) will be used. Later we can add support for QIcon::setThemeName().

Is it ok to submit PR with such change?

The same issue is present in LibreCAD 2.

feragon commented 4 years ago

Most LibreCAD's icons were not designed for a dark theme. I agree that we should support themes. How would it be stored? In another resource (.qrc) file ?

deric commented 4 years ago

I was looking at KDE Breeze theme where they use two directories with icons and a bash script to generate dark theme icons. I've tried similar approach, and the icons are at least readable (probably not graphically ideal). It should be fairly easy to maintain, when you add new icons, the dark version could be easily generated. Or do you have better idea?

u2n commented 3 years ago

This is still an issue; When a dark theme is used, icons disappear into the buttons, only vaguely reappearing when hovered.

As a newcomer to LC, it's alarming to see simple fixes like this not applied after 1.5 years. Guessing there must be a reason :^)

greembow commented 2 years ago

Any word on this? I really need dark icon support. EDIT: I don't deal with C++ all that much, but it looks like the paths to most of the icons are hardcoded. Honestly I have no clue how to possibly implement a menu option for dark theme icons. Perhaps something like a checkbox in the Application Settings menu that changes the loading of icons to ones that start with D for dark? For example: line.svg >> dline.svg I might do more research and see if this is something I could tackle.

and3rson commented 2 years ago

Bumping this issue. Any updates on this?