[gtk+] range: use border allocation for gadget hit test
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] range: use border allocation for gadget hit test
- Date: Thu, 3 Mar 2016 06:25:13 +0000 (UTC)
commit 8ebc03a1d1be20c6c4c52192d3584a976e3530c4
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Mar 2 22:23:11 2016 -0800
range: use border allocation for gadget hit test
The border is typically part of the reactive part of the widget. This
matches the pre-gadget behavior.
gtk/gtkrange.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index c8d6129..9953be8 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -3389,20 +3389,20 @@ gtk_range_update_mouse_location (GtkRange *range)
if (priv->grab_location != MOUSE_OUTSIDE)
priv->mouse_location = priv->grab_location;
else if (priv->stepper_a_gadget &&
- gtk_css_gadget_content_box_contains_point (priv->stepper_a_gadget, x, y))
+ gtk_css_gadget_border_box_contains_point (priv->stepper_a_gadget, x, y))
priv->mouse_location = MOUSE_STEPPER_A;
else if (priv->stepper_b_gadget &&
- gtk_css_gadget_content_box_contains_point (priv->stepper_b_gadget, x, y))
+ gtk_css_gadget_border_box_contains_point (priv->stepper_b_gadget, x, y))
priv->mouse_location = MOUSE_STEPPER_B;
else if (priv->stepper_c_gadget &&
- gtk_css_gadget_content_box_contains_point (priv->stepper_c_gadget, x, y))
+ gtk_css_gadget_border_box_contains_point (priv->stepper_c_gadget, x, y))
priv->mouse_location = MOUSE_STEPPER_C;
else if (priv->stepper_d_gadget &&
- gtk_css_gadget_content_box_contains_point (priv->stepper_d_gadget, x, y))
+ gtk_css_gadget_border_box_contains_point (priv->stepper_d_gadget, x, y))
priv->mouse_location = MOUSE_STEPPER_D;
- else if (gtk_css_gadget_content_box_contains_point (priv->slider_gadget, x, y))
+ else if (gtk_css_gadget_border_box_contains_point (priv->slider_gadget, x, y))
priv->mouse_location = MOUSE_SLIDER;
- else if (gtk_css_gadget_content_box_contains_point (priv->trough_gadget, x, y))
+ else if (gtk_css_gadget_border_box_contains_point (priv->trough_gadget, x, y))
priv->mouse_location = MOUSE_TROUGH;
else if (gtk_css_gadget_margin_box_contains_point (priv->gadget, x, y))
priv->mouse_location = MOUSE_WIDGET;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]