After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732256 - Add a flat style class and use it for flat buttons
Add a flat style class and use it for flat buttons
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-06-26 01:00 UTC by Matthias Clasen
Modified: 2014-06-27 02:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a flat style class and use it for flat buttons (5.60 KB, patch)
2014-06-26 01:03 UTC, Matthias Clasen
accepted-commit_now Details | Review
Add a flat style class and use it for flat buttons (7.46 KB, patch)
2014-06-26 01:54 UTC, Matthias Clasen
none Details | Review
entry: Make GtkEntry::has-frame use style classes (4.45 KB, patch)
2014-06-26 02:10 UTC, Matthias Clasen
none Details | Review
GtkFrame: Use style classes for shadow (4.20 KB, patch)
2014-06-26 03:19 UTC, Matthias Clasen
none Details | Review
Add a flat style class and use it for flat buttons (7.43 KB, patch)
2014-06-26 04:02 UTC, Matthias Clasen
none Details | Review
entry: Make GtkEntry::has-frame use style classes (4.82 KB, patch)
2014-06-26 04:03 UTC, Matthias Clasen
none Details | Review
GtkFrame: Use style classes for shadow (4.20 KB, patch)
2014-06-26 04:03 UTC, Matthias Clasen
none Details | Review
GtkViewport: Use style classes for shadow (2.51 KB, patch)
2014-06-26 04:03 UTC, Matthias Clasen
none Details | Review
GtkScrolledWindow: Use style classes for shadow (5.44 KB, patch)
2014-06-26 04:03 UTC, Matthias Clasen
none Details | Review

Description Matthias Clasen 2014-06-26 01:00:38 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.
Comment 1 Matthias Clasen 2014-06-26 01:03:27 UTC
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 2 Benjamin Otte (Company) 2014-06-26 01:08:41 UTC
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.
Comment 3 Matthias Clasen 2014-06-26 01:54:41 UTC
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.
Comment 4 Matthias Clasen 2014-06-26 02:10:00 UTC
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.
Comment 5 Matthias Clasen 2014-06-26 03:19:57 UTC
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.
Comment 6 Matthias Clasen 2014-06-26 04:02:56 UTC
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.
Comment 7 Matthias Clasen 2014-06-26 04:03:05 UTC
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.
Comment 8 Matthias Clasen 2014-06-26 04:03:14 UTC
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.
Comment 9 Matthias Clasen 2014-06-26 04:03:23 UTC
Created attachment 279289 [details] [review]
GtkViewport: Use style classes for shadow

Translate shadow != None into the FRAME style class.
Comment 10 Matthias Clasen 2014-06-26 04:03:32 UTC
Created attachment 279290 [details] [review]
GtkScrolledWindow: Use style classes for shadow

Translate shadow != None into the FRAME style class.
Comment 11 Matthias Clasen 2014-06-27 02:03:26 UTC
pushed