mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
switch: Fix int/double comparison
We get a double coordinate.
This commit is contained in:
parent
786d89cd9d
commit
7770bdcb36
@ -192,8 +192,8 @@ gtk_switch_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
|
||||
/* If the press didn't happen in the draggable handle,
|
||||
* cancel the pan gesture right away
|
||||
*/
|
||||
if ((priv->is_active && x <= allocation.width / 2) ||
|
||||
(!priv->is_active && x > allocation.width / 2))
|
||||
if ((priv->is_active && x <= allocation.width / 2.0) ||
|
||||
(!priv->is_active && x > allocation.width / 2.0))
|
||||
gtk_gesture_set_state (priv->pan_gesture, GTK_EVENT_SEQUENCE_DENIED);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user