Bug 346469 - Add checkbox(es) for Prefer Dark Variant (and Button Order)
Summary: Add checkbox(es) for Prefer Dark Variant (and Button Order)
Status: RESOLVED FIXED
Alias: None
Product: kde-gtk-config
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Manuel Tortosa
URL: https://bugs.kde.org/show_bug.cgi?id=...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-22 12:59 UTC by J Janz
Modified: 2017-06-15 12:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch that adds a "Prefer Dark GTK3 Theme" checkbox (7.52 KB, patch)
2017-06-13 16:37 UTC, Sebastian Schmidt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J Janz 2015-04-22 12:59:48 UTC
GTK now has a dark variant, currently not reacheable trough GUI. You can add the option manually (gtk-application-prefer-dark-theme = true in ~/.config/gtk-3.0/settings.ini) but it leads to bug #342320. (The same goes for gtk-alternative-button-order=1 but I only came to know about this one in the referenced bug =)  ).

Hence, a checkbox that sets this(/these) option(s) would do it. Perhaps this "prefer dark variant option" would only be enabled upon checking if there is one. Though not in an optimal way, this solves the referenced bug as side-effect.

Reproducible: Always

Steps to Reproduce:
1. Open KDE-GTK-Config
2. Choose theme
3. Can't choose dark variant (or button order).

Actual Results:  
3. Can't choose dark variant (or button order).

Expected Results:  
(Un)Check a Prefer Dark Variant option (and alternative button order) to achieve that.
Comment 1 Sebastian Schmidt 2017-06-13 16:37:47 UTC
Created attachment 106082 [details]
Patch that adds a "Prefer Dark GTK3 Theme" checkbox

I've written a patch that adds a checkbox to enable and disable the dark theme variant.
As the GTK setting clearly says "prefer", hiding this option when the selected theme does not supply a dark variant seems unnecessary.
Comment 2 Aleix Pol 2017-06-15 12:22:22 UTC
Thanks a lot for the patch!

Pushing, seems to work, I'm not sure how dark variants work in GTK though.

Please next time upload your patch to phabricator.kde.org.
Comment 3 Aleix Pol 2017-06-15 12:22:45 UTC
Git commit 2155e62af5a8466ea9632d01e16a08d8b40f7ba8 by Aleix Pol, on behalf of Sebastian Schmidt.
Committed on 15/06/2017 at 12:21.
Pushed by apol into branch 'master'.

Add a checkbox to enable dark GTK3 Themes

M  +15   -1    src/appearancegtk3.cpp
M  +2    -0    src/appearancegtk3.h
M  +2    -0    src/appearencegtk.cpp
M  +2    -0    src/appearencegtk.h
M  +5    -0    src/gtkconfigkcmodule.cpp
M  +16   -2    src/ui/gui.ui

https://commits.kde.org/kde-gtk-config/2155e62af5a8466ea9632d01e16a08d8b40f7ba8