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 681617 - radio button text isn't centered when draw indicator is FALSE
radio button text isn't centered when draw indicator is FALSE
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 682557 (view as bug list)
Depends on:
Blocks: 676539
 
 
Reported: 2012-08-10 17:30 UTC by William Jon McCann
Modified: 2012-08-23 16:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (505.24 KB, image/png)
2012-08-10 17:30 UTC, William Jon McCann
  Details
Don't left align label in check buttons when they have no indicator (1.40 KB, patch)
2012-08-10 17:43 UTC, William Jon McCann
none Details | Review
Don't left align label in check buttons when they have no indicator (1.42 KB, patch)
2012-08-14 15:19 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-08-10 17:30:19 UTC
Created attachment 220899 [details]
screenshot

When I have radio buttons in a homogeneous box and gtk_toggle_button_set_mode is FALSE the label text isn't centered.
Comment 1 William Jon McCann 2012-08-10 17:43:35 UTC
Created attachment 220900 [details] [review]
Don't left align label in check buttons when they have no indicator

Because they should be normal buttons in that case.
Comment 2 Paolo Borelli 2012-08-11 14:59:33 UTC
Review of attachment 220900 [details] [review]:

In general I do not like very much when widgets connect to their own signals or property notifications.

Can't we instead just set the right default alignment in constructed() after the draw_indicator property has been set?
Comment 3 William Jon McCann 2012-08-11 15:05:13 UTC
But that doesn't help if someone calls set_mode() later, right?
Comment 4 William Jon McCann 2012-08-14 15:19:43 UTC
Created attachment 221158 [details] [review]
Don't left align label in check buttons when they have no indicator

Because they should be normal buttons in that case.

Small optimization
Comment 5 William Jon McCann 2012-08-14 15:24:16 UTC
See blocking bug for use case.

Specifically:
  button1 = gtk_radio_button_new_with_label (NULL, _("Wallpapers"));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button1), TRUE);
  context = gtk_widget_get_style_context (button1);
  gtk_style_context_add_class (context, "raised");
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button1), FALSE);
Comment 6 William Jon McCann 2012-08-21 12:10:18 UTC
Attachment 221158 [details] pushed as 515e211 - Don't left align label in check buttons when they have no indicator
Comment 7 Cosimo Cecchi 2012-08-23 16:39:35 UTC
*** Bug 682557 has been marked as a duplicate of this bug. ***