GNOME Bugzilla – Bug 732256
Add a flat style class and use it for flat buttons
Last modified: 2014-06-27 02:03:26 UTC
This commit makes button always draw background and frame. Buttons with relief none get a new style class, flat, which allows themes to style these buttons as they like. We also (finally) mark GTK_RELIEF_HALF as deprecated. It has never done anything different from GTK_RELIEF_NORMAL.
Created attachment 279276 [details] [review] Add a flat style class and use it for flat buttons This commit makes button always draw background and frame. Buttons with relief none get a new style class, flat, which allows themes to style these buttons as they like. We also (finally) mark GTK_RELIEF_HALF as deprecated. It has never done anything different from GTK_RELIEF_NORMAL.
Comment on attachment 279276 [details] [review] Add a flat style class and use it for flat buttons Looks good with one comment: > + * A CSS class that is added to buttons, frames and scrolled windows > + * that don't have a visible frame or shadow. > I don't like that it's pretending to be a whitelist. I'd have sais something like: A CSS class that is added when widgets that usually have a frame or border (like buttons or entries) should appear without it.
Created attachment 279278 [details] [review] Add a flat style class and use it for flat buttons This commit makes button always draw background and frame. Buttons with relief none get a new style class, flat, which allows themes to style these buttons as they like. We also (finally) mark GTK_RELIEF_HALF as deprecated. It has never done anything different from GTK_RELIEF_NORMAL.
Created attachment 279279 [details] [review] entry: Make GtkEntry::has-frame use style classes Instead of code that internally does weird things, use the FLAT style class if has-frame is FALSE and remove it otherwise. Based on a patch by Benjamin Otte.
Created attachment 279282 [details] [review] GtkFrame: Use style classes for shadow Use the FLAT style class when shadow is set to none, and let the theme render the appropriate border.
Created attachment 279286 [details] [review] Add a flat style class and use it for flat buttons This commit makes button always draw background and frame. Buttons with relief none get a new style class, FLAT, which allows themes to style these buttons as they like. We also (finally) mark GTK_RELIEF_HALF as deprecated. It has never done anything different from GTK_RELIEF_NORMAL.
Created attachment 279287 [details] [review] entry: Make GtkEntry::has-frame use style classes Instead of code that internally does weird things, use the FRAME style class if has-frame is TRUE and remove it otherwise. Based on a patch by Benjamin Otte.
Created attachment 279288 [details] [review] GtkFrame: Use style classes for shadow Use the FLAT style class when shadow is set to none, and let the theme render the appropriate border.
Created attachment 279289 [details] [review] GtkViewport: Use style classes for shadow Translate shadow != None into the FRAME style class.
Created attachment 279290 [details] [review] GtkScrolledWindow: Use style classes for shadow Translate shadow != None into the FRAME style class.
pushed