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
Poor visibility of UI when using dark UI theme #1144
Comments
Note on black label "Command:" in attached screenshot: when LibreCAD is started fresh then that label is white, but mouseclick in edit field of that "Command:" ("Commant:" turns blus) and then hit ESC -> "Command:" turns black. |
A workaround:
To persist the settings, add this line to
Proper solution would require adding new set of icons. And supporting e.g. Breeze Dark |
When you go to Some icons can be loaded from desktop theme, the set of icons is limited and given by the freedesktop icons specification: if (using_theme)
action->setIcon(QIcon::fromTheme("document-new", QIcon(":/icons/new.svg")));
else
action->setIcon(QIcon(":/icons/new.svg")); LibreCAD icons could be easily converted to dark theme icons using simple bash script. Just go to icons directory:
and run this script to replace black color in SVG files: #!/bin/sh
# convert light colors to dark-theme colors
find -name "*.svg" | while read i;
do
fname=$( basename "$i")
fdir=$( dirname "$i")
sed -i -e 's/#000000/#f2f2f2/g' "$i"
done And recompile LibreCAD. This way you'll get an UI that looks more usable, although not ideal: In order to make this work, the code needs to be refactored. Replace: action->setIcon(QIcon(":/icons/select_intersected_entities.svg")); with something like: if (using_theme)
action->setIcon(QIcon::fromTheme("select-intersected-entities", QIcon(":/icons/select_intersected_entities.svg")));
else
action->setIcon(QIcon(":/icons/select_intersected_entities.svg"));
Anyone willing to help with this? |
Is it life? |
+1 |
As icons are SVG, and parsed by Qt during each launch, could it be solved internally by dynamically replacing colors during parsing icons SVG files? Then there would be no needs to create separate "dark icons" set. It should be implemented as an option "Icons: Even more, as LibreCAD icons has a limited set to 6 colors ("black" & "light gray" edges + "green", "dark grey", "light gray" & "white" fills) it might be possible create "Icons Colors" preferences list in "Widget Options", similar to "Application Preferences > Graphic Colors" preferences list. |
https://wiki.inkscape.org/wiki/Creating_a_multicolor_icon
Suggest:
|
For record purpose, I add also the Forum issue |
I modified the icons so that they look good in the dark theme. Maybe it will be useful to someone. |
What did you change? How about a screen shot of the two sets a comparison? The editor changed every icon even where there is no change to the appearance of the icon. |
Looks good! |
It is not easy. It is necessary to compile the source code. First download de source code cloning from github: Or directly downlad in dark-icons branch: and then compile Librecad: https://github.com/LibreCAD/LibreCAD/wiki/Build-from-source for me in linux works: I have seen that I will also have to edit the icons that are in png format. Sorry if I can't explain it well but my knowledge of git is very little (and of the English language too). |
I using KDE Plasma 5.16.5 in Linux. When UI theme is dark (f.e. "Breeze Dark" in this case) then most of icons, some labels in LibreCAD is poorly visible (black on dark background). See attached pictures.
UI should adapt to dark UI theme.
LibreCAD:
Version: 2.1.3
Compiler: GNU GCC 8.2.0
Compiled on: Sep 17 2018
Qt Version: 5.12.2
Boost Version: 1.67.0
System: Ubuntu 19.04
The text was updated successfully, but these errors were encountered: