[gtk+] switch: Fix text positioning
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] switch: Fix text positioning
- Date: Tue, 12 Jan 2016 20:58:14 +0000 (UTC)
commit b8db48079f7716290464cbee9ae879c95d406c65
Author: Timm Bäder <mail baedert org>
Date: Tue Jan 12 21:37:27 2016 +0100
switch: Fix text positioning
https://bugzilla.gnome.org/show_bug.cgi?id=760509
gtk/gtkswitch.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 9f6f659..249753b 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]