SettingsPopover: Gtk4 preparation#885
Closed
jeremypw wants to merge 3 commits into
Closed
Conversation
danirabbit
reviewed
Aug 1, 2025
| private static void update_active_colorbutton (Gtk.RadioButton default_button, string theme) { | ||
| SearchFunc<Gtk.RadioButton,string> find_colorbutton = (b, t) => strcmp (b.action_target.get_string (), t); | ||
| unowned var node = default_button.get_group ().search (theme, find_colorbutton); | ||
| private void update_active_colorbutton (Gtk.RadioButton default_button, string theme) { |
Member
There was a problem hiding this comment.
This seems incorrect to me. This should be automatically handled by a stateful action
| Gtk.StyleContext.add_provider_for_screen ( | ||
| Gdk.Screen.get_default (), | ||
| css_provider, | ||
| Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + 1 |
Member
There was a problem hiding this comment.
Why have you changed the style provider priority here?
|
|
||
| button.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON); | ||
| button.set_data<string> ("theme", theme); | ||
| button.get_style_context ().add_class ("color-button"); |
Member
There was a problem hiding this comment.
What's the reason for not using the Granite constant here?
| }; | ||
|
|
||
| button.get_style_context ().add_class (Granite.STYLE_CLASS_COLOR_BUTTON); | ||
| button.set_data<string> ("theme", theme); |
Member
There was a problem hiding this comment.
This doesn't seem right. This is what action_target is for
Collaborator
Author
|
Yes, it felt hacky when I did it during the trial port - I made a note there that I did it that way to reduce the porting diff. But as it is being done separately here we can do the job properly (which I see you have in separate PR - thanks). I'll close this one in favour of yours and do another cleanup PR later. |
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.
Theme button related code is changed to look more like the Gtk4 equivalent in the trial port (where it is necessary to use CheckButton)