entry: Fix text position

This commit is contained in:
Timm Bäder
2017-05-30 17:44:05 +02:00
committed by Matthias Clasen
parent 241a009938
commit 2687a9d132

View File

@@ -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");