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 703974 - Fix the alignment of the switch buttons
Fix the alignment of the switch buttons
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 698514 702363 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-07-10 23:26 UTC by Yosef Or Boczko
Modified: 2013-07-30 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bluetooth: fix the alignment of the switch button (1.63 KB, patch)
2013-07-10 23:27 UTC, Yosef Or Boczko
reviewed Details | Review
search: fix the alignment of the switch button (812 bytes, patch)
2013-07-10 23:27 UTC, Yosef Or Boczko
needs-work Details | Review
sharing: fix the alignment of the switch button (798 bytes, patch)
2013-07-10 23:27 UTC, Yosef Or Boczko
needs-work Details | Review
Screenshot - before (37.64 KB, image/png)
2013-07-10 23:27 UTC, Yosef Or Boczko
  Details
Screenshot - after (37.56 KB, image/png)
2013-07-10 23:28 UTC, Yosef Or Boczko
  Details
bluetooth: fix the alignment of the switch button (795 bytes, patch)
2013-07-11 23:07 UTC, Yosef Or Boczko
needs-work Details | Review
bluetooth: Fix stretched header bar switch (1.05 KB, patch)
2013-07-13 23:29 UTC, Yosef Or Boczko
committed Details | Review
search: Fix stretched header bar switch (948 bytes, patch)
2013-07-13 23:36 UTC, Yosef Or Boczko
committed Details | Review
sharing: Fix stretched header bar switch (1.65 KB, patch)
2013-07-14 00:02 UTC, Yosef Or Boczko
committed Details | Review
After - with padding (37.75 KB, image/png)
2013-07-14 00:06 UTC, Yosef Or Boczko
  Details
network: Fix stretched header bar switch (1.22 KB, patch)
2013-07-28 22:13 UTC, Yosef Or Boczko
committed Details | Review

Description Yosef Or Boczko 2013-07-10 23:26:30 UTC
See patches.
Comment 1 Yosef Or Boczko 2013-07-10 23:27:03 UTC
Created attachment 248897 [details] [review]
bluetooth: fix the alignment of the switch button
Comment 2 Yosef Or Boczko 2013-07-10 23:27:15 UTC
Created attachment 248898 [details] [review]
search: fix the alignment of the switch button
Comment 3 Yosef Or Boczko 2013-07-10 23:27:27 UTC
Created attachment 248899 [details] [review]
sharing: fix the alignment of the switch button
Comment 4 Yosef Or Boczko 2013-07-10 23:27:56 UTC
Created attachment 248900 [details]
Screenshot - before
Comment 5 Yosef Or Boczko 2013-07-10 23:28:13 UTC
Created attachment 248901 [details]
Screenshot - after
Comment 6 William Jon McCann 2013-07-11 22:33:12 UTC
Review of attachment 248897 [details] [review]:

Nice catch. I think it is pretty clear that the switch was not indented to be vertically stretched. However, the fix results in an asymmetric padding around the switch. More on the bottom than on the right. I wonder if we should compensate for that with a right margin.

::: panels/bluetooth/cc-bluetooth-panel.c
@@ +813,3 @@
+	switch_button = WID ("switch_bluetooth");
+	gtk_widget_set_valign (switch_button, GTK_ALIGN_CENTER);
+

I suspect it is cleaner to make this change in the UI file.
Comment 7 William Jon McCann 2013-07-11 22:35:55 UTC
Thanks again for the patches! Just a general comment, the commit message in the patches should describe the problem a bit more. Doesn't have to be a book but at least one sentence would be nice.
Comment 8 Yosef Or Boczko 2013-07-11 23:07:38 UTC
Created attachment 248976 [details] [review]
bluetooth: fix the alignment of the switch button
Comment 9 Bastien Nocera 2013-07-12 08:12:30 UTC
Review of attachment 248976 [details] [review]:

As Jon mentioned though, the commit message isn't good. The subject should describe the problem fixed, so it could be "Fix stretched header bar switch".
The right padding problem is also a blocker.

::: panels/bluetooth/bluetooth.ui
@@ +9,3 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
+        <property name="valign">3</property>

you can use the symbolic name here, so it should be "center".
Comment 10 Bastien Nocera 2013-07-12 08:13:05 UTC
Review of attachment 248898 [details] [review]:

Same comments as for the Bluetooth panel changes.

::: panels/search/cc-search-panel.c
@@ +614,2 @@
   widget = gtk_switch_new ();
+  gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);

Needs to be in the .ui file instead.
Comment 11 Bastien Nocera 2013-07-12 08:13:29 UTC
Review of attachment 248899 [details] [review]:

::: panels/sharing/cc-sharing-panel.c
@@ +1015,3 @@
   /* create the master switch */
   priv->master_switch = gtk_switch_new ();
+  gtk_widget_set_valign (priv->master_switch, GTK_ALIGN_CENTER);

Ditto.
Comment 12 Volker Sobek (weld) 2013-07-12 14:41:57 UTC
*** Bug 698514 has been marked as a duplicate of this bug. ***
Comment 13 Yosef Or Boczko 2013-07-13 23:29:56 UTC
Created attachment 249080 [details] [review]
bluetooth: Fix stretched header bar switch

it is also adds padding of 4px.
Comment 14 Yosef Or Boczko 2013-07-13 23:36:00 UTC
Created attachment 249081 [details] [review]
search: Fix stretched header bar switch

(In reply to comment #10)
> Review of attachment 248898 [details] [review]:
> 
> Same comments as for the Bluetooth panel changes.
> 
> ::: panels/search/cc-search-panel.c
> @@ +614,2 @@
>    widget = gtk_switch_new ();
> +  gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
> 
> Needs to be in the .ui file instead.

How?
The switch button is defined in the code, not in the .ui file.
Comment 15 Yosef Or Boczko 2013-07-14 00:02:26 UTC
Created attachment 249082 [details] [review]
sharing: Fix stretched header bar switch

(In reply to comment #11)
> Review of attachment 248899 [details] [review]:
> 
> ::: panels/sharing/cc-sharing-panel.c
> @@ +1015,3 @@
>    /* create the master switch */
>    priv->master_switch = gtk_switch_new ();
> +  gtk_widget_set_valign (priv->master_switch, GTK_ALIGN_CENTER);
> 
> Ditto.

Ditto: the switch button is defined in the code, not in the .ui file.
Comment 16 Yosef Or Boczko 2013-07-14 00:06:09 UTC
Created attachment 249084 [details]
After - with padding
Comment 17 Allan Day 2013-07-15 16:33:00 UTC
*** Bug 702363 has been marked as a duplicate of this bug. ***
Comment 18 Allan Day 2013-07-15 17:13:26 UTC
(In reply to comment #16)
> Created an attachment (id=249084) [details]
> After - with padding

Looks good.
Comment 19 Bastien Nocera 2013-07-19 12:48:31 UTC
Review of attachment 249080 [details] [review]:

Looks good
Comment 20 Bastien Nocera 2013-07-19 12:48:51 UTC
Review of attachment 249081 [details] [review]:

Looks good
Comment 21 Bastien Nocera 2013-07-19 12:49:23 UTC
Review of attachment 249082 [details] [review]:

Looks good
Comment 22 Yosef Or Boczko 2013-07-19 13:39:12 UTC
Review of attachment 249080 [details] [review]:

pushed as ff8a214c5f793419b5b8fae47043fabd10dee202 - bluetooth: Fix stretched header bar switch
Comment 23 Yosef Or Boczko 2013-07-19 13:39:51 UTC
Review of attachment 249081 [details] [review]:

pushed as 2ebf5e7dd3474cd827fa6052faac73af893f119d - search: Fix stretched header bar switch
Comment 24 Yosef Or Boczko 2013-07-19 13:40:15 UTC
Review of attachment 249082 [details] [review]:

pushed as dd1a0c8dce17f3f3c993331d54320a304ca03772 - sharing: Fix stretched header bar switch
Comment 25 Yosef Or Boczko 2013-07-28 22:13:11 UTC
Missing patch for network panel (airplane mode switch).
Comment 26 Yosef Or Boczko 2013-07-28 22:13:55 UTC
Created attachment 250335 [details] [review]
network: Fix stretched header bar switch
Comment 27 Bastien Nocera 2013-07-30 12:29:43 UTC
Review of attachment 250335 [details] [review]:

Looks good.
Comment 28 Yosef Or Boczko 2013-07-30 12:33:45 UTC
Review of attachment 250335 [details] [review]:

pushed as 30e0080ccc1f594850bf17120cf360d758b1e9b2 - network: Fix stretched header bar switch