switch: Fix text positioning
https://bugzilla.gnome.org/show_bug.cgi?id=760509
This commit is contained in:
parent
a8ceeb1766
commit
b8db48079f
@ -624,8 +624,8 @@ gtk_switch_render_trough (GtkCssGadget *gadget,
|
||||
|
||||
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
||||
|
||||
label_x = ((width / 2) - rect.width) / 2;
|
||||
label_y = (height - rect.height) / 2;
|
||||
label_x = x + ((width / 2) - rect.width) / 2;
|
||||
label_y = y + (height - rect.height) / 2;
|
||||
|
||||
gtk_render_layout (context, cr, label_x, label_y, layout);
|
||||
|
||||
@ -638,8 +638,8 @@ gtk_switch_render_trough (GtkCssGadget *gadget,
|
||||
|
||||
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
||||
|
||||
label_x = (width / 2) + ((width / 2) - rect.width) / 2;
|
||||
label_y = (height - rect.height) / 2;
|
||||
label_x = x + (width / 2) + ((width / 2) - rect.width) / 2;
|
||||
label_y = y + (height - rect.height) / 2;
|
||||
|
||||
gtk_render_layout (context, cr, label_x, label_y, layout);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user