[gtk+/wip/baedert/drawing: 11/73] entry: Fix text position
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk+/wip/baedert/drawing: 11/73] entry: Fix text position
- Date: Thu, 22 Jun 2017 08:06:14 +0000 (UTC)
commit 3ff9d460b9549019107d35df0a590cf0107a1261
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]