forked from AuroraMiddleware/gtk
Allow context menus on scale sliders
This will be used for a popup in the color chooser.
This commit is contained in:
parent
e56adaebea
commit
cd300835d7
@ -2548,6 +2548,16 @@ gtk_range_button_press (GtkWidget *widget,
|
||||
if (gtk_range_update_mouse_location (range))
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
if (priv->mouse_location == MOUSE_SLIDER &&
|
||||
gdk_event_triggers_context_menu ((GdkEvent *)event))
|
||||
{
|
||||
gboolean handled;
|
||||
|
||||
g_signal_emit_by_name (widget, "popup-menu", &handled);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (priv->mouse_location == MOUSE_TROUGH &&
|
||||
event->button == GDK_BUTTON_PRIMARY)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user