theme: add GTK3 selection colours so selected rows stay readable in Thunar etc#191
Open
kanikamaxxing wants to merge 1 commit into
Open
theme: add GTK3 selection colours so selected rows stay readable in Thunar etc#191kanikamaxxing wants to merge 1 commit into
kanikamaxxing wants to merge 1 commit into
Conversation
Ambxst's GtkGenerator wrote only the libadwaita-flavoured colour variables (accent_color, accent_fg_color, window_bg_color, etc.). GTK3 apps like Thunar read different variable names (theme_selected_bg_color, theme_selected_fg_color, theme_bg_color, theme_fg_color, theme_base_color, theme_text_color), so they fell back to the underlying theme's defaults — which on adw-gtk3 dark leaves selected rows with the global view foreground (white-ish) painted on top of the matugen accent colour (often a light pastel). The result was near-illegible selected entries in file listings. This change: - Adds theme_selected_bg_color and theme_selected_fg_color mapped to accent_bg_color / accent_fg_color so GTK3 selection picks up the same dark-on-bright contrast libadwaita gets for GTK4. - Mirrors theme_bg_color / theme_fg_color / theme_base_color / theme_text_color from the existing window/view variables for completeness. - Adds an explicit *:selected override for rows in views so the contrast holds regardless of any inherited row-style from the underlying theme. No behavioural change for GTK4 / libadwaita consumers — they already pick up the accent_* family unchanged.
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.
Summary
GtkGeneratorwrites only the libadwaita-flavoured colour variables (accent_color,accent_fg_color,window_bg_color, …). GTK3 apps like Thunar read a different set of names (theme_selected_bg_color,theme_selected_fg_color,theme_bg_color,theme_fg_color,theme_base_color,theme_text_color), so they fall back to whatever the underlying theme provides — onadw-gtk3dark that leaves selected rows with the global view foreground (near-white) painted on top of the matugen accent colour (often a light pastel). Result: barely-readable selected entries in file listings.Changes
modules/theme/GtkGenerator.qml(+20/-1):theme_selected_bg_color/theme_selected_fg_colortoaccent_bg_color/accent_fg_colorso GTK3 selection inherits the same dark-on-bright contrast libadwaita uses for GTK4.theme_bg_color/theme_fg_color/theme_base_color/theme_text_colorfrom the existing window/view variables for completeness.*:selected, row:selectedoverride so the contrast holds even when the underlying theme has its own row-style.No behaviour change for GTK4 / libadwaita consumers — they already pick up the
accent_*family unchanged.Test plan
— robin