[gtk+/wip/baedert/drawing: 42/71] entry: Fix text position



commit 794f9ab32565a2eedeea2b522e75ac0988fe8e92
Author: Timm Bäder <mail baedert org>
Date:   Tue May 30 17:44:05 2017 +0200

    entry: Fix text position

 gtk/gtkentry.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 0265656..a8fa3dd 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3037,7 +3037,7 @@ gtk_entry_get_text_allocation (GtkEntry     *entry,
   GtkEntryPrivate *priv = entry->priv;
 
   gtk_widget_get_content_allocation (GTK_WIDGET (entry), allocation);
-  allocation->x += priv->text_x;
+  allocation->x = priv->text_x;
   allocation->width = priv->text_width;
 }
 
@@ -3474,8 +3474,8 @@ gtk_entry_snapshot (GtkWidget   *widget,
 
   /* Draw text and cursor */
   cr = gtk_snapshot_append_cairo (snapshot,
-                                  &GRAPHENE_RECT_INIT (allocation.x + priv->text_x,
-                                                       allocation.y,
+                                  &GRAPHENE_RECT_INIT (priv->text_x,
+                                                       0,
                                                        priv->text_width,
                                                        allocation.height),
                                   "Entry Text");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]