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 708000 - Align better the buttons in the headerbar
Align better the buttons in the headerbar
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: shell
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-12 23:33 UTC by Yosef Or Boczko
Modified: 2013-09-28 19:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell: Make the lock button align better (1.52 KB, patch)
2013-09-12 23:34 UTC, Yosef Or Boczko
needs-work Details | Review
shell: Align better the buttons in the headerbar (1.09 KB, patch)
2013-09-12 23:34 UTC, Yosef Or Boczko
needs-work Details | Review
Screenshot - before (18.76 KB, image/png)
2013-09-13 05:47 UTC, Yosef Or Boczko
  Details
Screenshot - after (18.75 KB, image/png)
2013-09-13 05:48 UTC, Yosef Or Boczko
  Details
shell: Align better the buttons in the headerbar (2.17 KB, patch)
2013-09-17 10:57 UTC, Yosef Or Boczko
needs-work Details | Review
mouse: Make the test button align better (1.65 KB, patch)
2013-09-17 10:57 UTC, Yosef Or Boczko
needs-work Details | Review
shell: Align better the buttons in the headerbar (2.54 KB, patch)
2013-09-19 17:36 UTC, Yosef Or Boczko
none Details | Review
shell: Align better the buttons in the headerbar (2.54 KB, patch)
2013-09-19 17:37 UTC, Yosef Or Boczko
committed Details | Review
mouse: Make the test button align better (2.07 KB, patch)
2013-09-28 19:18 UTC, Yosef Or Boczko
committed Details | Review

Description Yosef Or Boczko 2013-09-12 23:33:28 UTC
The buttons need to be same height, also a buttons with text.

See the patches.
Comment 1 Yosef Or Boczko 2013-09-12 23:34:08 UTC
Created attachment 254826 [details] [review]
shell: Make the lock button align better
Comment 2 Yosef Or Boczko 2013-09-12 23:34:21 UTC
Created attachment 254827 [details] [review]
shell: Align better the buttons in the headerbar
Comment 3 Matthias Clasen 2013-09-13 00:50:47 UTC
do you have before/after screenshots showing the problem and its fix ?
Comment 4 Yosef Or Boczko 2013-09-13 05:47:32 UTC
Created attachment 254831 [details]
Screenshot - before
Comment 5 Yosef Or Boczko 2013-09-13 05:48:54 UTC
Created attachment 254832 [details]
Screenshot - after

Note: The difference is very small.
Comment 6 Bastien Nocera 2013-09-17 09:00:16 UTC
I think that both patches should be merged into one, and the sizegroup reused.
Comment 7 Bastien Nocera 2013-09-17 09:00:40 UTC
Comment on attachment 254826 [details] [review]
shell: Make the lock button align better

Marking as needs-work as per comment
Comment 8 Bastien Nocera 2013-09-17 09:00:55 UTC
Comment on attachment 254827 [details] [review]
shell: Align better the buttons in the headerbar

Marking as needs-work as per comment
Comment 9 Yosef Or Boczko 2013-09-17 10:57:23 UTC
Created attachment 255088 [details] [review]
shell: Align better the buttons in the headerbar
Comment 10 Yosef Or Boczko 2013-09-17 10:57:39 UTC
Created attachment 255089 [details] [review]
mouse: Make the test button align better
Comment 11 Kalev Lember 2013-09-17 19:09:19 UTC
Review of attachment 255088 [details] [review]:

In addition to my nitpicks down below, rtcm pointed out on IRC that the patch isn't including the close button in the size group.

::: shell/cc-window.c
@@ +89,3 @@
   GQueue     *previous_panels;
 
+  GtkSizeGroup *size;

'size' is a bit ambiguous, might be better to call the variable 'header_sizegroup' or similar.

@@ +955,3 @@
+
+  gtk_size_group_add_widget (GTK_SIZE_GROUP (priv->size), priv->previous_button);
+  gtk_size_group_add_widget (GTK_SIZE_GROUP (priv->size), widget);

Is priv->previous_button supposed to get added to the size group here, in _shell_embed_widget_in_header() ?

I would move it below to create_header() where the previous_button is created and where you add the rest of the widgets to the size group.

Also, the typecasts are unnecessary here -- the variable is already a GtkSizeGroup *

@@ +1509,3 @@
+
+  gtk_size_group_add_widget (GTK_SIZE_GROUP (priv->size), priv->search_button);
+  gtk_size_group_add_widget (GTK_SIZE_GROUP (priv->size), priv->lock_button);

Unnecessary typecasts.
Comment 12 Yosef Or Boczko 2013-09-19 17:36:57 UTC
Created attachment 255319 [details] [review]
shell: Align better the buttons in the headerbar
Comment 13 Yosef Or Boczko 2013-09-19 17:37:28 UTC
Created attachment 255320 [details] [review]
shell: Align better the buttons in the headerbar
Comment 14 Kalev Lember 2013-09-19 21:46:25 UTC
Review of attachment 255320 [details] [review]:

Looks good to me now, thanks.

I wonder if headerbar should do this automatically. Seems like a common use case to ensure all children are of the same height. A "homogeneous" property maybe, for GTK+ 3.12?
Comment 15 Bastien Nocera 2013-09-19 23:11:13 UTC
(In reply to comment #14)
> Review of attachment 255320 [details] [review]:
> 
> Looks good to me now, thanks.
> 
> I wonder if headerbar should do this automatically. Seems like a common use
> case to ensure all children are of the same height. A "homogeneous" property
> maybe, for GTK+ 3.12?

Can you please file a bug about it?
Comment 16 Yosef Or Boczko 2013-09-27 09:17:31 UTC
Review of attachment 255320 [details] [review]:

pushed as 11a074525ce4efae3daa55111f07421851a9dc89 - shell: Align better the buttons in the headerbar
Comment 17 Kalev Lember 2013-09-28 13:37:03 UTC
Review of attachment 255089 [details] [review]:

Looks good to me, just one minor issue below. Also, would be nice to add an additional paragraph to the commit message saying that this patch removes unwanted 2 pixels of spacing around the button.

::: panels/mouse/cc-mouse-panel.c
@@ -108,3 @@
-  gtk_widget_set_visible (box, TRUE);
-
-  priv->shell_header = g_object_ref (box);

Please remove priv->shell_header now that it's unused.
Comment 18 Yosef Or Boczko 2013-09-28 19:18:30 UTC
Created attachment 255989 [details] [review]
mouse: Make the test button align better
Comment 19 Kalev Lember 2013-09-28 19:48:27 UTC
Review of attachment 255989 [details] [review]:

Looks good to me now, thanks!
Comment 20 Yosef Or Boczko 2013-09-28 19:50:29 UTC
Review of attachment 255989 [details] [review]:

pushed as 50488b1ea07be40bbcefa1663fe4e3bd86ac180f - mouse: Make the test button align better