[gtk/usable-scales] scale: Make the area arond the trough clickable
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/usable-scales] scale: Make the area arond the trough clickable
- Date: Wed, 13 May 2020 19:26:42 +0000 (UTC)
commit 1825b7d2e27ffb1d22014b689f80c5861a7e856e
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 13 15:23:23 2020 -0400
scale: Make the area arond the trough clickable
The narrow trough is too hard to hit as a click target.
Make the entire scale clickable.
gtk/gtkrange.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 95c728a4fe..38efd2aec4 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1878,10 +1878,10 @@ gtk_range_click_gesture_pressed (GtkGestureClick *gesture,
mouse_location = gtk_widget_pick (widget, x, y, 0);
- /* For the purposes of this function, we ignore fill and highlight and
- * handle them like the trough */
- if (mouse_location == priv->fill_widget ||
- mouse_location == priv->highlight_widget)
+ /* For the purposes of this function, we treat anything outside
+ * the slider like a click on the trough
+ */
+ if (mouse_location != priv->slider_widget)
mouse_location = priv->trough_widget;
if (mouse_location == priv->slider_widget)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]