LibreCAD_3 icon indicating copy to clipboard operation
LibreCAD_3 copied to clipboard

Dark theme icons support

Open deric opened this issue 4 years ago • 5 comments

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.

deric avatar Oct 28 '20 10:10 deric

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 ?

feragon avatar Nov 24 '20 19:11 feragon

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?

deric avatar Nov 24 '20 21:11 deric

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 :^)

u2n avatar May 30 '21 12:05 u2n

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.

greembow avatar Dec 10 '21 20:12 greembow

Bumping this issue. Any updates on this?

and3rson avatar Apr 19 '22 13:04 and3rson