Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark theme icons support #364

Open
deric opened this issue Oct 28, 2020 · 5 comments
Open

Dark theme icons support #364

deric opened this issue Oct 28, 2020 · 5 comments

Comments

@deric
Copy link

deric commented Oct 28, 2020

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
Copy link
Member

feragon commented Nov 24, 2020

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
Copy link
Author

deric commented Nov 24, 2020

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
Copy link

u2n commented May 30, 2021

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
Copy link

greembow commented Dec 10, 2021

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
Copy link

and3rson commented Apr 19, 2022

Bumping this issue. Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants