[gtk+] entry: Fix icon areas



commit 6e2c5518968529bb1acab66b54f2e61dcaacf000
Author: Timm Bäder <mail baedert org>
Date:   Sun Jan 31 16:17:03 2016 +0100

    entry: Fix icon areas
    
    Do the same thing we already do in gtk_entry_get_text_area.

 gtk/gtkentry.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 4f169a7..68e6b5a 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -9119,7 +9119,11 @@ gtk_entry_get_icon_area (GtkEntry             *entry,
 
   if (icon_info)
     {
+      GtkAllocation widget_allocation;
+      gtk_widget_get_allocation (GTK_WIDGET (entry), &widget_allocation);
       gtk_css_gadget_get_border_allocation (icon_info->gadget, icon_area, NULL);
+      icon_area->x -= widget_allocation.x;
+      icon_area->y -= widget_allocation.y;
     }
   else
     {


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