Commit 63cefa19 authored by Benjamin Otte's avatar Benjamin Otte

popover: Don't inherit style from parent

Instead, inherit style from toplevel (because that's the default way,
not because it makes lots of sense).

This way, popovers don't inherit the styling from the widget that popped
them up, which is a problem in selected listbox rows, selection-mode
It also doesn't inherit styling where we might want it, like the osd.

But we can only have one of the two things.
parent 5b7bed68
......@@ -1664,20 +1664,6 @@ gtk_popover_class_init (GtkPopoverClass *klass)
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_POPOVER_ACCESSIBLE);
static void
_gtk_popover_update_context_parent (GtkPopover *popover)
GtkPopoverPrivate *priv = popover->priv;
GtkStyleContext *context, *parent_context = NULL;
context = gtk_widget_get_style_context (GTK_WIDGET (popover));
if (priv->widget)
parent_context = gtk_widget_get_style_context (priv->widget);
gtk_style_context_set_parent (context, parent_context);
static void
_gtk_popover_parent_hierarchy_changed (GtkWidget *widget,
GtkWidget *previous_toplevel,
......@@ -1707,8 +1693,6 @@ _gtk_popover_parent_hierarchy_changed (GtkWidget *widget,
if (new_window)
gtk_popover_update_position (popover);
_gtk_popover_update_context_parent (popover);
if (gtk_widget_is_visible (GTK_WIDGET (popover)))
gtk_widget_queue_resize (GTK_WIDGET (popover));
......@@ -1986,7 +1970,6 @@ gtk_popover_update_relative_to (GtkPopover *popover,
_gtk_widget_update_parent_muxer (GTK_WIDGET (popover));
_gtk_popover_update_context_parent (popover);
g_object_unref (popover);
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