[gtk/gbsneto/rounded-stuff: 2/2] widget: Do input on borders



commit f21c943172e6bc74c078ef93ced40c12e3857c6b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Feb 11 08:03:00 2019 -0200

    widget: Do input on borders
    
    The current pick implementation ignores input on
    borders, which deviates from the expected GTK4
    behavior.
    
    Adapt the input rectangle to consider the widget
    borders as well.

 gtk/gtkwidget.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index e144fc6087..8aab610d86 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11261,10 +11261,10 @@ gtk_widget_pick (GtkWidget *widget,
   get_box_padding (style, &padding);
   get_border_radius (style, border_radius);
 
-  rect = GRAPHENE_RECT_INIT (- padding.left,
-                             - padding.top,
-                             priv->allocation.width - margin.left - margin.right - border.left  - 
border.right,
-                             priv->allocation.height - margin.top  - margin.bottom - border.top  - 
border.bottom);
+  rect = GRAPHENE_RECT_INIT (- padding.left - border.left,
+                             - padding.top - border.top,
+                             priv->allocation.width - margin.left - margin.right,
+                             priv->allocation.height - margin.top  - margin.bottom);
 
 
   if (has_border_radius (border_radius))


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