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 706416 - suggested action button is 1px taller than regular button
suggested action button is 1px taller than regular button
Status: RESOLVED FIXED
Product: gnome-themes-standard
Classification: Core
Component: Adwaita GTK3 theme
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-themes-standard-maint
gnome-themes-standard-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-20 15:41 UTC by Andreas Nilsson
Modified: 2013-08-21 10:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (270.30 KB, image/png)
2013-08-20 15:41 UTC, Andreas Nilsson
  Details
patch to address the issue (985 bytes, patch)
2013-08-20 15:48 UTC, Andreas Nilsson
none Details | Review
screenshot with patch in action (265.61 KB, image/png)
2013-08-20 15:49 UTC, Andreas Nilsson
  Details
patch to address the issue v2 (4.54 KB, patch)
2013-08-20 20:34 UTC, Andreas Nilsson
needs-work Details | Review
patch version 3 (4.94 KB, patch)
2013-08-21 00:46 UTC, Andreas Nilsson
reviewed Details | Review
patch v4 (16.09 KB, patch)
2013-08-21 09:27 UTC, Andreas Nilsson
committed Details | Review

Description Andreas Nilsson 2013-08-20 15:41:06 UTC
Created attachment 252442 [details]
screenshot

The suggested action button is just slightly, slightly taller than the regular button.
Comment 1 Andreas Nilsson 2013-08-20 15:48:05 UTC
Created attachment 252443 [details] [review]
patch to address the issue

This should fix the issue. I was unable to find how regular buttons do this specifically, but this seemed to do the trick.
Comment 2 Andreas Nilsson 2013-08-20 15:49:00 UTC
Created attachment 252444 [details]
screenshot with patch in action
Comment 3 Cosimo Cecchi 2013-08-20 16:48:31 UTC
This is a tricky one - the button is not actually taller than the other, but the other embeds an 1px semi-transparent shadow in its bottom border.

The ideal fix would be to prepare a similar asset for this button, and use border-image like we do for regular buttons instead of border-color. Otherwise, with your fix, you'll get a weird effect towards the bottom, where the curvatures of the box-shadow and the one of the border don't perfectly collide.
Comment 4 Andreas Nilsson 2013-08-20 17:18:43 UTC
This would also be needed for the destructive button introduced in #706385
Comment 5 Cosimo Cecchi 2013-08-20 17:26:21 UTC
Yeah, indeed.
Comment 6 Andreas Nilsson 2013-08-20 19:40:52 UTC
I think I figured this out now. Patch coming soon.
Comment 7 Andreas Nilsson 2013-08-20 20:34:47 UTC
Created attachment 252474 [details] [review]
patch to address the issue v2

Second try.
Comment 8 Cosimo Cecchi 2013-08-20 22:08:36 UTC
Review of attachment 252474 [details] [review]:

Looks much better - still some comments below.

::: themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
@@ +262,3 @@
+.suggested-action.button,
+.suggested-action.button:active {
+    border-image: -gtk-scaled(url("borders/button-border-suggested.png"),url("borders/button-border-suggested@2.png")) 3 3 4 3 / 3px 3px 4px 3px stretch;

You need to copy the selectors for these borders - possibly including a different asset - for the dark theme variant in gtk-widgets-borders-dark.css

@@ +269,3 @@
+}
+
+    border-radius: 3px;

Comment should say "destructive" instead of "suggested"

::: themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ +3115,1 @@
     border-width: 1px;

I think you should be able to remove these border sections completely from these selectors in gtk-widgets.css, as you define the border already in gtk-widgets-borders.css
Comment 9 Andreas Nilsson 2013-08-21 00:46:28 UTC
Created attachment 252497 [details] [review]
patch version 3

Addressed review.
Comment 10 Cosimo Cecchi 2013-08-21 07:49:32 UTC
Review of attachment 252497 [details] [review]:

Is this on top of the previous patch? Can you squash them together when you commit?

::: themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -3113,3 @@
-    border-style: solid;
-    border-color: transparent;
-    border-width: 1px;

I think you're still missing to remove these from the destructive button selector.
Comment 11 Andreas Nilsson 2013-08-21 09:27:27 UTC
Created attachment 252514 [details] [review]
patch v4

Man, I'm really the worst with git, but I hope this works.
Comment 12 Cosimo Cecchi 2013-08-21 09:34:26 UTC
Yeah, patch looks good! I squashed the commits into a single one for you and pushed it to master.
Thanks!
Comment 13 Andreas Nilsson 2013-08-21 10:34:30 UTC
Did all the images got included as well?
I can't see the borders under OSTree now.
Comment 14 Cosimo Cecchi 2013-08-21 10:43:41 UTC
Hmm, we forgot to add them to the theme GResource. I pushed another fix to git master now, can you please test the latest?
Comment 15 Andreas Nilsson 2013-08-21 10:57:28 UTC
That did the trick!
Everything working as expected now.