Closed ra1nb0w closed 1 year ago
Good question. I think the default colors for QtAwesome should be retrieved from the system.
QApplication::palette()
At the moment they are hardcoded!
something like
QPalette palette;
setDefaultOption("color", palette.color(QPalette::Dark));
setDefaultOption("color-off", palette.color(QPalette::Dark));
setDefaultOption("color-disabled", palette.color(QPalette::Midlight));
setDefaultOption("color-active", palette.color(QPalette::Light));
setDefaultOption("color-selected", palette.color(QPalette::Light));
The new release should improve the dark/light mode situation. The default options now are based on the palette:
setDefaultOption("color", QApplication::palette().color(QPalette::Normal, QPalette::Text));
setDefaultOption("color-disabled", QApplication::palette().color(QPalette::Disabled, QPalette::Text));
setDefaultOption("color-active", QApplication::palette().color(QPalette::Active, QPalette::Text));
setDefaultOption("color-selected", QApplication::palette().color(QPalette::Active, QPalette::Text));
I guess this issue can be marked as done (see previous comment)
first of all thanks for your work! I am using another software openhantek that use your library. Unfortunately in macOS with darkmode the icons are nearly indistinguishable with the background (see the image at the end). Before patching openhantek I would like to ask you if that change could be fit on this library? Just for test I did
and it works.
Default behaviour of QtAwesome in openhantek. The red icon that is visible is an svg file.