Closed timlinux closed 1 year ago
Maybe we could take something like this and use some well worked out themes to deal with darkness...
@timlinux , I'd use night mapping theme as a starting point. It's now pretty solid and has QGIS specific rules.
It'd then be a matter of changing the color variable definition and some css properties to match desired outcome.
@nirvn I'm a little confused why we have src/app/qgisappstylesheet.cpp, since by the look of that logic we need to override not only the stylesheets but change theme specific code. Would you suggest adding another if clause in appstylesheet.cpp to provide dark theme defaults. Also confusing to me is that my QGIS3.ini is still set to default since the darkness hint comes from my gnome theme rather than an explicit choice to use night mapping - so I am not even sure if I am using night mapping or dedault at run time (guess I will go and poke around in the pythin console to check on that).
[UI]
UITheme=default
allWidgetsVisible=false
annotationTool=3
Are you on Linux or OSX?
Linux @nirvn
@timlinux , and what's your Qt style? Fusion? I didn't know that had dark theme awareness.
In any case, you're definitely not on a non default theme. I suspect you're using a Qt style that's badly emulating gnome adwaita's dark mode or something.
You can switch to the night mapping theme, that'll hardcode Qt style to fusion.
hi @nirvn yes it is already on fusion and the UI theme at the moment is default. I can switch to Night Mapping (see below) but I think that kinda bypasses the problem: When users have a dark theme active on their desktop parts of QGIS are unreadable / very poorly readable.
When I switch to night mapping, it does indeed provide readable labels in the list widget. I wonder if we could somehow detect that a user is in dark mode and enable dark mapping? Though I guess that will break other cases where they have a custom Qt theme active....
Here is another issue (using night mapping), any black icons are not visible in the list. I guess this might be the same problem in the regular theme when colours are inverted.......
@timlinux
Here is another issue (using night mapping), any black icons are not visible in the list. I guess this might be the same problem in the regular theme when colours are inverted.......
Right. I think we need a generic approach to handle this, as I also get frustrated with "invisible" white symbols in the list on light themes!
Thanks for the fixes @nyalldawson, I am reopening because I found another one! (referring to the buttons above).
Found another one!
@timlinux are you sure there's actually text there?
Urf, I am a dummy!
Here is another, maybe more tricky one, @nyalldawson, @nirvn
When a layer is not selected:
When a layer is selected:
The colour for the symbol swatch changes which makes it pretty misleading. Not sure if this happens in light mode...
Ohh I am running out of dark theme issues now @nyalldawson thanks for all the little tweaks! Once the Expressions icon is updated I think things are generally pretty usable in dark mode. I will reopen if I find more little gotchas. Will comment on the icon theme over on the PR.
Just when we thought dark theme was usable eh? Tooltips everywhere are unreadable in dark mode....
@timlinux , I'm on it.
There is always one more thing eh? This time I noticed the indicator icons are unreable...
I'm a tiny bit on the edge with this one. I think we have to make sure we respect the spirit of a dark theme (vs. high contrast). We can probably add halos like what you see on the playback button here. I just want to keep sure we consciously think of a dark themed look vs. a high contrast black on white look :)
@nirvn I think that one can ONLY be solved by doing a symbolic color replacement. It's actually the most straightforward of them, since those icons are already monochrome...
There are also readability issues on some widgets (calendar, drop down, numeric, etc.) in the forms in read-only:
With the editing mode activated, it's all good:
for me the the dark text is in the drop down menu
Ditto, drop downs went dark for me from 3.22.10 to 3.22.12
The night mapping dark menu text has been fixed, will be available in the next point release.
Ditto, I can confirm regression on 3.22.12.
Ditto, menu text has been dark and unreadable for me on 3.22.12 and 3.28.0
This has been an issue for me through several QGIS versions (this example from 3.28) on Mac. The Mac is set to switch to Night Shift at sunset. QGIS is set to Fusion style, default theme.
If QGIS is open when the Mac switches to NightShift, it tries unsuccessfully to go into NightMapping:
The above is unusable so I have to restart QGIS after which it looks great:
I had never had any issue with night mapping on other versions of QGIS (using since 3.14, I think), and after updating from 3.26 to 3.28 last week, now I have this issue:
I'm on Win10 with dark mode, but it had never been an issue so far, everything always readable. I've tried restarting QGIS and even changing the style and ui theme and doesn't solve it.
Here is a fix/workaround that worked for me to fix the drop down menus having black text.
The night mapping dark menu text has been fixed, will be available in the next point release.
@nirvn Should this issue be closed ?
Does it also fix the widget rendering, as described here https://github.com/qgis/QGIS/issues/47065#issuecomment-1070834934 ?
@rbovard If you can, could you try a nightly build ?
@rbovard If you can, could you try a nightly build ?
I can try ~next week~, I'll keep you posted.
If this ticket is being left open for any similar problems to be reported: Elevation Profile axis labels are unreadable using night mapping:
EDIT: there are various other places in QGIS with the same problem of illegible black text on the dark background:
Also see #49775
Another issue with night mapping is that spinboxes or whatever these things are have some sort of internal border, which cuts off the bottom of the text:
In night mapping there also isn't enough contrast in the Processing Model Designer - all the linkages and in/out information aren't legible enough:
EDIT: perhaps this is really the same issue as rbovard pointed out; there are various places in QGIS with text in that colour on the dark background.
@rbovard If you can, could you try a nightly build ?
@nicogodet I just tried 3.29.0-Master
and the issue on read-only widgets (calendar, drop down, numeric, etc.) is still here.
... EDIT: there are various other places in QGIS with the same problem of illegible black text on the dark background ...
One place is progress bars:
Any objections for me to close this issue in favor of people re-opening issues to cover individual incompatibilities?
This PR (https://github.com/qgis/QGIS/pull/54078) as well as other commits pushed in the last week have fixed the majority of issues raised here.
@nirvn I think that makes sense!
I know it's currently closed, but is there any chance someone could look at pull request #52971, which addresses #49775? Or do I need to open a new one?
What is the bug or the crash?
There are various places in QGIS where the text is not switched to a light colour resulting in unreable text in the UI, Maybe we should gather up all the dark theme issues to make it a more usable experince.
See also #33079
Steps to reproduce the issue
Open style manager for single symbol renderer - though the problem is all over the show in QGIS.
Versions
QGIS Master and backwards
Supported QGIS version
New profile
Additional context
No response