[gtk+/wip/baedert/drawing: 303/371] entry: Fix undershoot position



commit b12b94c8106e67cb618529e1ba534c36dac1c339
Author: Timm Bäder <mail baedert org>
Date:   Wed Jun 28 07:46:46 2017 +0200

    entry: Fix undershoot position

 gtk/gtkentry.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index d051271..5b04ef7 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3194,7 +3194,6 @@ gtk_entry_draw_undershoot (GtkEntry    *entry,
   GtkEntryPrivate *priv = entry->priv;
   GtkStyleContext *context;
   gint min_offset, max_offset;
-  GtkAllocation allocation;
   GdkRectangle rect;
   gboolean rtl;
 
@@ -3204,9 +3203,6 @@ gtk_entry_draw_undershoot (GtkEntry    *entry,
   gtk_entry_get_scroll_limits (entry, &min_offset, &max_offset);
 
   gtk_entry_get_text_allocation (entry, &rect);
-  gtk_widget_get_allocation (GTK_WIDGET (entry), &allocation);
-  rect.x -= allocation.x;
-  rect.y -= allocation.y;
 
   if (priv->scroll_offset > min_offset)
     {
@@ -3490,7 +3486,7 @@ gtk_entry_event (GtkWidget *widget,
       GtkAllocation icon_alloc;
       if (priv->icons[i])
         {
-          gtk_widget_get_allocation (priv->icons[i]->widget, &icon_alloc);
+          gtk_widget_get_outer_allocation (priv->icons[i]->widget, &icon_alloc);
 
           if (gdk_rectangle_contains_point (&icon_alloc, (int)x, (int)y))
             {


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