feat(Themes): add support for GTK3 dynamic theming#2523
Draft
euletheia wants to merge 1 commit into
Draft
Conversation
Instead of overriding named colors of all GTK3 themes via the config directory file, we only override named colors for each variant of the adw-gtk3 theme (light and dark), and let GTK3 apps change themes depending on the value of org.gnome.desktop.interface color-scheme.
This will be great.
This would probably also solve #1555 as a side effect.
Sounds acceptable to me. The current way of simply overwriting everything with the adw3 light theme is certainly not better.
If DMS is committed to adw-gtk3 anyway, it can also ship it. And if a prefix is added, this really keeps it separate from the system installation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
'Proof of concept'
Instead of overriding named colors of all GTK3 themes via the config directory file, we only override named colors for each variant of the adw-gtk3 theme (light and dark), and let GTK3 apps switch theme variant depending on the value of org.gnome.desktop.interface color-scheme.
This implies :
gtk-light-colors.cssmatugen template1.However, the main shortcoming of this method is having to rely on the adw-gtk3 theme being installed in the user themes directory2 when package managers will install it system-wide in
/usr/share.This also entails that theming GTK3 apps without adw-gtk3 (via the
.configoverride) would no longer be provided by DMS (at least I did not write anything to provide a fallback/choice).Eventually, I don't know on which side you think the burden should weigh, but a stable solution could be to vendor the theme3.
Obviously, considering the size of the change, I could have overlooked some issues, but I've been using this patch for roughly a week and it seems stable.
Screenshots
contrib_DMS.mp4
Footnotes
At least my tests showed no blatant issue without those 8000 LOC. ↩
Considering they don't use the legacy
$HOME/.themesfolder. ↩with a "dank" prefix to differentiate it from the original ? ↩