Skip to content

SourceRow: create accent colors for screen#931

Open
danirabbit wants to merge 2 commits intomasterfrom
danirabbit/sourcerow-styleforscreen
Open

SourceRow: create accent colors for screen#931
danirabbit wants to merge 2 commits intomasterfrom
danirabbit/sourcerow-styleforscreen

Conversation

@danirabbit
Copy link
Member

Adding styles to a style context is deprecated and in Gtk4 styles don't propagate to all the children of a style context. So create styles that can be added to the screen and cache them so we don't make duplicates

@danirabbit danirabbit requested a review from a team February 26, 2026 17:27
@danirabbit danirabbit moved this to Needs Review in GTK4 Porting Feb 26, 2026
Copy link
Member

@leolost2605 leolost2605 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little comment :)

visible_checkbutton.get_style_context ().add_class (color_class);

if (providers == null) {
providers = new Gee.HashMap<string, Gtk.CssProvider> ();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could put this in a static construct or just assign in the declaration, i.e.
private static Gee.HashMap<string, Gtk.CssProvider> providers = new Gee.HashMap<string, Gtk.CssProvider> ();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

2 participants