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

Unreadable text in dark theme #47065

Closed
2 tasks done
timlinux opened this issue Jan 29, 2022 · 42 comments · Fixed by #47071 or #47110
Closed
2 tasks done

Unreadable text in dark theme #47065

timlinux opened this issue Jan 29, 2022 · 42 comments · Fixed by #47071 or #47110
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience

Comments

@timlinux
Copy link
Member

timlinux commented Jan 29, 2022

What is the bug or the crash?

image

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.

image

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

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@timlinux timlinux added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 29, 2022
@gioman gioman added the GUI/UX Related to QGIS application GUI or User Experience label Jan 29, 2022
@timlinux
Copy link
Member Author

Maybe we could take something like this and use some well worked out themes to deal with darkness...

https://github.com/Alexhuszagh/BreezeStyleSheets

@nirvn
Copy link
Contributor

nirvn commented Jan 30, 2022

@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.

@timlinux
Copy link
Member Author

@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

@nirvn
Copy link
Contributor

nirvn commented Jan 30, 2022

Are you on Linux or OSX?

@timlinux
Copy link
Member Author

Linux @nirvn

@nirvn
Copy link
Contributor

nirvn commented Jan 30, 2022

@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.

@timlinux
Copy link
Member Author

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....

image

@timlinux
Copy link
Member Author

image

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.......

@nyalldawson
Copy link
Collaborator

@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!

nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jan 31, 2022
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jan 31, 2022
This breaks dark theme readability

Fixes qgis#47065
nyalldawson added a commit that referenced this issue Jan 31, 2022
nyalldawson added a commit that referenced this issue Jan 31, 2022
This breaks dark theme readability

Fixes #47065
qgis-bot pushed a commit that referenced this issue Jan 31, 2022
qgis-bot pushed a commit that referenced this issue Jan 31, 2022
This breaks dark theme readability

Fixes #47065
nyalldawson added a commit that referenced this issue Jan 31, 2022
nyalldawson added a commit that referenced this issue Jan 31, 2022
This breaks dark theme readability

Fixes #47065
@timlinux
Copy link
Member Author

timlinux commented Jan 31, 2022

image

Thanks for the fixes @nyalldawson, I am reopening because I found another one! (referring to the buttons above).

@timlinux timlinux reopened this Jan 31, 2022
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Feb 1, 2022
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Feb 1, 2022
nyalldawson added a commit that referenced this issue Feb 1, 2022
@timlinux
Copy link
Member Author

timlinux commented Feb 1, 2022

imagem

Found another one!

@timlinux timlinux reopened this Feb 1, 2022
nyalldawson added a commit that referenced this issue Feb 20, 2022
This breaks dark theme readability

Fixes #47065
nyalldawson added a commit that referenced this issue Feb 20, 2022
unreadable text on dark themes

Fixes #47065

(cherry picked from commit 0188cbe)
nyalldawson added a commit that referenced this issue Feb 21, 2022
nyalldawson added a commit that referenced this issue Feb 21, 2022
This breaks dark theme readability

Fixes #47065
nyalldawson added a commit that referenced this issue Feb 21, 2022
unreadable text on dark themes

Fixes #47065

(cherry picked from commit 0188cbe)
@rbovard
Copy link

rbovard commented Mar 17, 2022

There are also readability issues on some widgets (calendar, drop down, numeric, etc.) in the forms in read-only:

image

With the editing mode activated, it's all good:

image

@edurojasr
Copy link

for me the the dark text is in the drop down menu

Screenshot from 2022-10-24 17-57-57

@Geojim
Copy link

Geojim commented Nov 3, 2022

Ditto, drop downs went dark for me from 3.22.10 to 3.22.12

@nirvn
Copy link
Contributor

nirvn commented Nov 3, 2022

The night mapping dark menu text has been fixed, will be available in the next point release.

@WhitespaceQ
Copy link

Ditto, I can confirm regression on 3.22.12.

@pesilva93
Copy link

Ditto, menu text has been dark and unreadable for me on 3.22.12 and 3.28.0

@gubuntu
Copy link

gubuntu commented Nov 15, 2022

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:
Screenshot 2022-11-15 at 19 48 20

The above is unusable so I have to restart QGIS after which it looks great:
Screenshot 2022-11-15 at 19 56 01

@soraimperial
Copy link

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:

image

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.

image

@VWO97
Copy link

VWO97 commented Nov 18, 2022

Here is a fix/workaround that worked for me to fix the drop down menus having black text.
explorer_KvYcloDCh9
Code_oGBqtsgGS8

@nicogodet
Copy link
Member

The night mapping dark menu text has been fixed, will be available in the next point release.

@nirvn Should this issue be closed ?

@rbovard
Copy link

rbovard commented Nov 18, 2022

Does it also fix the widget rendering, as described here #47065 (comment) ?

@nicogodet
Copy link
Member

@rbovard If you can, could you try a nightly build ?

@rbovard
Copy link

rbovard commented Nov 18, 2022

@rbovard If you can, could you try a nightly build ?

I can try next week, I'll keep you posted.

@AlisterH
Copy link
Contributor

AlisterH commented Jan 24, 2023

If this ticket is being left open for any similar problems to be reported: Elevation Profile axis labels are unreadable using night mapping:
image
EDIT: there are various other places in QGIS with the same problem of illegible black text on the dark background:
image

@AlisterH
Copy link
Contributor

Also see #49775

@AlisterH
Copy link
Contributor

AlisterH commented Feb 9, 2023

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:
image

@AlisterH
Copy link
Contributor

AlisterH commented Feb 14, 2023

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

rbovard commented Feb 14, 2023

@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.

@AlisterH
Copy link
Contributor

AlisterH commented May 9, 2023

...
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:
image

@nirvn
Copy link
Contributor

nirvn commented Aug 5, 2023

Any objections for me to close this issue in favor of people re-opening issues to cover individual incompatibilities?

This PR (#54078) as well as other commits pushed in the last week have fixed the majority of issues raised here.

@nyalldawson
Copy link
Collaborator

@nirvn I think that makes sense!

@nirvn nirvn closed this as completed Aug 5, 2023
@AlisterH
Copy link
Contributor

AlisterH commented Aug 5, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience
Projects
None yet