Commit f93795d2 authored by Matthias Clasen's avatar Matthias Clasen

Add a style class for touch selection popovers

parent 93e61c1f
......@@ -9723,6 +9723,8 @@ bubble_targets_received (GtkClipboard *clipboard,
priv->selection_bubble = gtk_popover_new (GTK_WIDGET (entry));
gtk_style_context_add_class (gtk_widget_get_style_context (priv->selection_bubble),
GTK_STYLE_CLASS_OSD);
gtk_style_context_add_class (gtk_widget_get_style_context (priv->selection_bubble),
GTK_STYLE_CLASS_TOUCH_SELECTION);
gtk_popover_set_position (GTK_POPOVER (priv->selection_bubble),
GTK_POS_TOP);
gtk_popover_set_modal (GTK_POPOVER (priv->selection_bubble), FALSE);
......
......@@ -296,6 +296,16 @@ struct _GtkStyleContextClass
*/
#define GTK_STYLE_CLASS_CONTEXT_MENU "context-menu"
/**
* GTK_STYLE_CLASS_TOUCH_SELECTION:
*
* A CSS class for touch selection popups on entries
* and text views.
*
* Since: 3.16
*/
#define GTK_STYLE_CLASS_TOUCH_SELECTION "touch-selection"
/**
* GTK_STYLE_CLASS_MENUBAR:
*
......
......@@ -9038,6 +9038,8 @@ bubble_targets_received (GtkClipboard *clipboard,
priv->selection_bubble = gtk_popover_new (GTK_WIDGET (text_view));
gtk_style_context_add_class (gtk_widget_get_style_context (priv->selection_bubble),
GTK_STYLE_CLASS_OSD);
gtk_style_context_add_class (gtk_widget_get_style_context (priv->selection_bubble),
GTK_STYLE_CLASS_TOUCH_SELECTION);
gtk_popover_set_position (GTK_POPOVER (priv->selection_bubble),
GTK_POS_TOP);
gtk_popover_set_modal (GTK_POPOVER (priv->selection_bubble), FALSE);
......
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