[gtk+] entry: Fix get_text_allocation
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] entry: Fix get_text_allocation
- Date: Wed, 10 Jan 2018 09:51:03 +0000 (UTC)
commit 6235b12ca4a26c1843f9fc15963a800353e81b64
Author: Timm Bäder <mail baedert org>
Date: Wed Jan 10 10:49:13 2018 +0100
entry: Fix get_text_allocation
These should be reported in GtkEntry coordinates, so relative to the
entry's origin. This fixes entrys with top/bottom padding applied.
gtk/gtkentry.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 7ecec90..fd3742d 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3076,9 +3076,10 @@ gtk_entry_get_text_allocation (GtkEntry *entry,
{
GtkEntryPrivate *priv = entry->priv;
- gtk_widget_get_own_allocation (GTK_WIDGET (entry), allocation);
allocation->x = priv->text_x;
+ allocation->y = 0;
allocation->width = priv->text_width;
+ allocation->height = gtk_widget_get_height (GTK_WIDGET (entry));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]