You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Colored action buttons for Gtk::FileChooserDialog #2208
Is your feature request related to a problem? Please describe.
Synfig file chooser dialog utilizes header bar while some dialogs utilize standard Gtk::Dialog with the title bar. It'll be more useful if action buttons placed in the header bar are colored like normal GTK/GNOME apps to visually guide/assist the user.
Describe the solution you'd like
GTK provides CSS classes suggested-action and destructive-action for action buttons OK/Open/Save and Cancel/Close respectively
@ice0@rodolforg Am I understanding this correctly: any Gtk::FileChooserDialog should have colored action buttons? For example cancel or save buttons in the save diolog, or cancel and open in the open diolog?
@ice0 at the moment I am not finding any information on how to colorize the FileChooserDialog buttons. I understand how to colorize individual buttons, but not the FileChooserDialog buttons
@nickleus27 if you're on Linux there's a package called gtk3-demo. I found out about colored action buttons in this example program Theming > Style Classes
For Synfig IIRC you have to get the dialog object style context and call in object.add_class("action-name")
@ice0@rodolforg Am I understanding this correctly: any Gtk::FileChooserDialog should have colored action buttons? For example cancel or save buttons in the save diolog, or cancel and open in the open diolog?
Should I be using xml for this like the gtk+demo example and the reference Rodolfo posted? Because I have gotten it work with Keyikedalube's example using context->add_class()
EDITED: I answered the first question in this comment, so I deleted it.
Activity
nickleus27 commentedon Jan 2, 2022
is anyone working on this?
rodolforg commentedon Jan 2, 2022
Not that I know of. :)
nickleus27 commentedon Jan 2, 2022
cool. I will work on it if that is okay.
nickleus27 commentedon Jan 3, 2022
@ice0 @rodolforg Am I understanding this correctly: any
Gtk::FileChooserDialogshould have colored action buttons? For examplecancelorsavebuttons in the save diolog, orcancelandopenin the open diolog?ice0 commentedon Jan 3, 2022
@nickleus27
Yes if it is possible. I haven't tested it, but maybe they just aren't customizable.
nickleus27 commentedon Jan 3, 2022
@ice0 at the moment I am not finding any information on how to colorize the
FileChooserDialog buttons. I understand how to colorize individual buttons, but not theFileChooserDialog buttonsKeyikedalube commentedon Jan 3, 2022
Hello :)
@nickleus27 if you're on Linux there's a package called
gtk3-demo. I found out about colored action buttons in this example programTheming > Style ClassesFor Synfig IIRC you have to get the dialog object style context and call in
object.add_class("action-name")nickleus27 commentedon Jan 3, 2022
@Keyikedalube Thank you, that is very helpful. I am experimenting with that now.
Will that work with the dialog object since dialog is not a button?
Keyikedalube commentedon Jan 3, 2022
@nickleus27 Forgive my incorrect answer. Instead of the entire dialog you have to get only the button's object style context.
rodolforg commentedon Jan 3, 2022
The aim is not to make everything colorful :D I believe @Keyikedalube suggested to follow these guidelines: https://wiki.gnome.org/HowDoI/Buttons .
nickleus27 commentedon Jan 3, 2022
@rodolforg right, the idea is to use
"suggested-action"class anddestructive-action "class for theaction buttonsin thefilechooserdialogs?nickleus27 commentedon Jan 3, 2022
Should I be using
xmlfor this like the gtk+demo example and the reference Rodolfo posted? Because I have gotten it work with Keyikedalube's example usingcontext->add_class()EDITED: I answered the first question in this comment, so I deleted it.
rodolforg commentedon Jan 3, 2022
No, you don't have to. Sometimes it could not be possible anyway