Commit a4a122c8 authored by Carlos Garnacho's avatar Carlos Garnacho

colorswatch: Set gestures in GTK_PHASE_TARGET

That's the right phase for gestures replacing entirely event handlers.
parent d59c9096
......@@ -90,13 +90,13 @@ gtk_color_swatch_init (GtkColorSwatch *swatch)
swatch->priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (swatch));
g_signal_connect (swatch->priv->long_press_gesture, "pressed",
G_CALLBACK (hold_action), swatch);
gtk_gesture_attach (swatch->priv->long_press_gesture, GTK_PHASE_BUBBLE);
gtk_gesture_attach (swatch->priv->long_press_gesture, GTK_PHASE_TARGET);
swatch->priv->multipress_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (swatch));
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (swatch->priv->multipress_gesture), FALSE);
g_signal_connect (swatch->priv->multipress_gesture, "pressed",
G_CALLBACK (tap_action), swatch);
gtk_gesture_attach (swatch->priv->multipress_gesture, GTK_PHASE_BUBBLE);
gtk_gesture_attach (swatch->priv->multipress_gesture, GTK_PHASE_TARGET);
}
#define INTENSITY(r, g, b) ((r) * 0.30 + (g) * 0.59 + (b) * 0.11)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment