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

[RFE] add dark theme support #102

Closed
5 of 9 tasks
genodeftest opened this issue Apr 26, 2016 · 3 comments
Closed
5 of 9 tasks

[RFE] add dark theme support #102

genodeftest opened this issue Apr 26, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@genodeftest
Copy link
Collaborator

genodeftest commented Apr 26, 2016

There are some minor issues with dark themes, e.g.:

There are some common issues that don't fit there, so I'm opening a new bug report to lay out an idea how to fix this.

Workaround: disable dark theme altogether. gnome-calendar does this. This could be shipped pretty fast.

How to actually fix colors:

  • having good theme variant detection working
    • for environment variables: GTK_THEME=Adwaita:light
    • for GtkSettings key gtk-application-prefer-dark-theme
    • detect other themes which are not Adwaita but might be dark without specifying a dark variant
  • implement some logic to always have enough contrast to background but keep color tendencies, i.e. don't keep the exact RGBA value but allow dark green to become light green, etc.. See also this W3C spec on how to get contrast right
  • make sure to get all custom color codes set somewhere.

Alternative approach as suggested by Gtk+ developer Matthias Clasen:

  • detect theme (as above)
  • load custom CSS files .installed { color: #darkgreen; }
  • add style classes like installed to those GtkWidgets that need custom themes

This seems to be "the modern Gtk+ 3.x way".
This is nice and clean, but doesn't fix the problem for unknown dark themes without gtk-application-prefer-dark-theme set. Gtk+ people don't seem to care about that though.

If nobody objects, I'll be working on this.

@timlau
Copy link
Owner

timlau commented Apr 27, 2016

Agree there is some issues with "Dark" themes, It would be great if you would look into it.

@genodeftest genodeftest self-assigned this Apr 29, 2016
@genodeftest genodeftest added this to the Future milestone Apr 29, 2016
@genodeftest
Copy link
Collaborator Author

Theme detection is working: https://gist.github.com/genodeftest/94e623123f20566d158569a2ef3b25a2

@timlau
Copy link
Owner

timlau commented Jun 29, 2021

Dark themes is working fine in current release and support for custom yumex themeing is added

@timlau timlau closed this as completed Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants