forked from AuroraMiddleware/gtk
Always chain up in ::style-updated
This was not handled consistently, but the default handler does useful things, so we should always chain up.
This commit is contained in:
parent
14eb34874a
commit
beb8c290d1
@ -1123,6 +1123,8 @@ gtk_assistant_style_updated (GtkWidget *widget)
|
|||||||
GtkAssistantPrivate *priv = assistant->priv;
|
GtkAssistantPrivate *priv = assistant->priv;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_assistant_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
list = priv->pages;
|
list = priv->pages;
|
||||||
|
|
||||||
while (list)
|
while (list)
|
||||||
|
@ -1386,6 +1386,8 @@ gtk_button_style_updated (GtkWidget *widget)
|
|||||||
{
|
{
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_button_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (widget);
|
context = gtk_widget_get_style_context (widget);
|
||||||
|
|
||||||
gtk_button_update_image_spacing (GTK_BUTTON (widget), context);
|
gtk_button_update_image_spacing (GTK_BUTTON (widget), context);
|
||||||
|
@ -1347,6 +1347,8 @@ gtk_combo_box_style_updated (GtkWidget *widget)
|
|||||||
GtkComboBoxPrivate *priv = combo_box->priv;
|
GtkComboBoxPrivate *priv = combo_box->priv;
|
||||||
GtkWidget *child;
|
GtkWidget *child;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_combo_box_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
gtk_combo_box_check_appearance (combo_box);
|
gtk_combo_box_check_appearance (combo_box);
|
||||||
|
|
||||||
if (priv->tree_view && priv->cell_view)
|
if (priv->tree_view && priv->cell_view)
|
||||||
|
@ -508,6 +508,8 @@ gtk_dialog_map (GtkWidget *widget)
|
|||||||
static void
|
static void
|
||||||
gtk_dialog_style_updated (GtkWidget *widget)
|
gtk_dialog_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
|
GTK_WIDGET_CLASS (gtk_dialog_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
update_spacings (GTK_DIALOG (widget));
|
update_spacings (GTK_DIALOG (widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4468,6 +4468,8 @@ gtk_entry_style_updated (GtkWidget *widget)
|
|||||||
gint focus_width;
|
gint focus_width;
|
||||||
gboolean interior_focus;
|
gboolean interior_focus;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_entry_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
gtk_widget_style_get (widget,
|
gtk_widget_style_get (widget,
|
||||||
"focus-line-width", &focus_width,
|
"focus-line-width", &focus_width,
|
||||||
"interior-focus", &interior_focus,
|
"interior-focus", &interior_focus,
|
||||||
|
@ -656,6 +656,8 @@ gtk_font_selection_screen_changed (GtkWidget *widget,
|
|||||||
static void
|
static void
|
||||||
gtk_font_selection_style_updated (GtkWidget *widget)
|
gtk_font_selection_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
|
GTK_WIDGET_CLASS (gtk_font_selection_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
/* Maybe fonts where installed or removed... */
|
/* Maybe fonts where installed or removed... */
|
||||||
gtk_font_selection_reload_fonts (GTK_FONT_SELECTION (widget));
|
gtk_font_selection_reload_fonts (GTK_FONT_SELECTION (widget));
|
||||||
}
|
}
|
||||||
|
@ -512,6 +512,8 @@ gtk_handle_box_style_updated (GtkWidget *widget)
|
|||||||
GtkHandleBox *hb = GTK_HANDLE_BOX (widget);
|
GtkHandleBox *hb = GTK_HANDLE_BOX (widget);
|
||||||
GtkHandleBoxPrivate *priv = hb->priv;
|
GtkHandleBoxPrivate *priv = hb->priv;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_handle_box_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
if (gtk_widget_get_realized (widget) &&
|
if (gtk_widget_get_realized (widget) &&
|
||||||
gtk_widget_get_has_window (widget))
|
gtk_widget_get_has_window (widget))
|
||||||
{
|
{
|
||||||
|
@ -1479,6 +1479,8 @@ gtk_icon_view_state_flags_changed (GtkWidget *widget,
|
|||||||
static void
|
static void
|
||||||
gtk_icon_view_style_updated (GtkWidget *widget)
|
gtk_icon_view_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
|
GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
_gtk_icon_view_update_background (GTK_ICON_VIEW (widget));
|
_gtk_icon_view_update_background (GTK_ICON_VIEW (widget));
|
||||||
gtk_widget_queue_resize (widget);
|
gtk_widget_queue_resize (widget);
|
||||||
}
|
}
|
||||||
|
@ -2002,13 +2002,9 @@ gtk_image_get_preferred_height (GtkWidget *widget,
|
|||||||
static void
|
static void
|
||||||
gtk_image_style_updated (GtkWidget *widget)
|
gtk_image_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GtkImage *image;
|
|
||||||
|
|
||||||
image = GTK_IMAGE (widget);
|
|
||||||
|
|
||||||
GTK_WIDGET_CLASS (gtk_image_parent_class)->style_updated (widget);
|
GTK_WIDGET_CLASS (gtk_image_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
icon_theme_changed (image);
|
icon_theme_changed (GTK_IMAGE (widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -495,6 +495,8 @@ gtk_info_bar_style_updated (GtkWidget *widget)
|
|||||||
gint content_area_spacing;
|
gint content_area_spacing;
|
||||||
gint content_area_border;
|
gint content_area_border;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
gtk_widget_style_get (widget,
|
gtk_widget_style_get (widget,
|
||||||
"button-spacing", &button_spacing,
|
"button-spacing", &button_spacing,
|
||||||
"action-area-border", &action_area_border,
|
"action-area-border", &action_area_border,
|
||||||
|
@ -3821,6 +3821,8 @@ gtk_label_style_updated (GtkWidget *widget)
|
|||||||
{
|
{
|
||||||
GtkLabel *label = GTK_LABEL (widget);
|
GtkLabel *label = GTK_LABEL (widget);
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_label_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
/* We have to clear the layout, fonts etc. may have changed */
|
/* We have to clear the layout, fonts etc. may have changed */
|
||||||
gtk_label_clear_layout (label);
|
gtk_label_clear_layout (label);
|
||||||
gtk_label_invalidate_wrap_width (label);
|
gtk_label_invalidate_wrap_width (label);
|
||||||
|
@ -366,9 +366,9 @@ gtk_link_button_add (GtkContainer *container,
|
|||||||
static void
|
static void
|
||||||
gtk_link_button_style_updated (GtkWidget *widget)
|
gtk_link_button_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GtkLinkButton *link_button = GTK_LINK_BUTTON (widget);
|
GTK_WIDGET_CLASS (gtk_link_button_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
set_link_color (link_button);
|
set_link_color (GTK_LINK_BUTTON (widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2445,6 +2445,8 @@ gtk_menu_reorder_child (GtkMenu *menu,
|
|||||||
static void
|
static void
|
||||||
gtk_menu_style_updated (GtkWidget *widget)
|
gtk_menu_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
|
GTK_WIDGET_CLASS (gtk_menu_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
if (gtk_widget_get_realized (widget))
|
if (gtk_widget_get_realized (widget))
|
||||||
{
|
{
|
||||||
GtkMenu *menu = GTK_MENU (widget);
|
GtkMenu *menu = GTK_MENU (widget);
|
||||||
|
@ -4143,6 +4143,8 @@ gtk_text_view_style_updated (GtkWidget *widget)
|
|||||||
text_view = GTK_TEXT_VIEW (widget);
|
text_view = GTK_TEXT_VIEW (widget);
|
||||||
priv = text_view->priv;
|
priv = text_view->priv;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_text_view_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
if (gtk_widget_get_realized (widget))
|
if (gtk_widget_get_realized (widget))
|
||||||
{
|
{
|
||||||
gtk_text_view_set_background (text_view);
|
gtk_text_view_set_background (text_view);
|
||||||
|
@ -1868,11 +1868,13 @@ gtk_toolbar_style_updated (GtkWidget *widget)
|
|||||||
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
||||||
GtkToolbarPrivate *priv = toolbar->priv;
|
GtkToolbarPrivate *priv = toolbar->priv;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
priv->max_homogeneous_pixels = -1;
|
priv->max_homogeneous_pixels = -1;
|
||||||
|
|
||||||
if (gtk_widget_get_realized (widget))
|
if (gtk_widget_get_realized (widget))
|
||||||
gtk_style_context_set_background (gtk_widget_get_style_context (widget),
|
gtk_style_context_set_background (gtk_widget_get_style_context (widget),
|
||||||
gtk_widget_get_window (widget));
|
gtk_widget_get_window (widget));
|
||||||
|
|
||||||
gtk_toolbar_update_button_relief (GTK_TOOLBAR (widget));
|
gtk_toolbar_update_button_relief (GTK_TOOLBAR (widget));
|
||||||
}
|
}
|
||||||
|
@ -808,6 +808,8 @@ gtk_tool_button_update_icon_spacing (GtkToolButton *button)
|
|||||||
static void
|
static void
|
||||||
gtk_tool_button_style_updated (GtkWidget *widget)
|
gtk_tool_button_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
|
GTK_WIDGET_CLASS (parent_class)->style_updated (widget);
|
||||||
|
|
||||||
gtk_tool_button_update_icon_spacing (GTK_TOOL_BUTTON (widget));
|
gtk_tool_button_update_icon_spacing (GTK_TOOL_BUTTON (widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8489,6 +8489,8 @@ gtk_tree_view_style_updated (GtkWidget *widget)
|
|||||||
GList *list;
|
GList *list;
|
||||||
GtkTreeViewColumn *column;
|
GtkTreeViewColumn *column;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
if (gtk_widget_get_realized (widget))
|
if (gtk_widget_get_realized (widget))
|
||||||
{
|
{
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
|
@ -926,11 +926,13 @@ gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment,
|
|||||||
static void
|
static void
|
||||||
gtk_viewport_style_updated (GtkWidget *widget)
|
gtk_viewport_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
|
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
if (gtk_widget_get_realized (widget) &&
|
if (gtk_widget_get_realized (widget) &&
|
||||||
gtk_widget_get_has_window (widget))
|
gtk_widget_get_has_window (widget))
|
||||||
{
|
{
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
GtkViewport *viewport = GTK_VIEWPORT (widget);
|
GtkViewport *viewport = GTK_VIEWPORT (widget);
|
||||||
GtkViewportPrivate *priv = viewport->priv;
|
GtkViewportPrivate *priv = viewport->priv;
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (widget);
|
context = gtk_widget_get_style_context (widget);
|
||||||
|
@ -5341,6 +5341,8 @@ gtk_window_style_updated (GtkWidget *widget)
|
|||||||
GtkWindowPrivate *priv = window->priv;
|
GtkWindowPrivate *priv = window->priv;
|
||||||
GdkRectangle rect;
|
GdkRectangle rect;
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (gtk_window_parent_class)->style_updated (widget);
|
||||||
|
|
||||||
if (priv->grip_window != NULL && gtk_window_get_resize_grip_area (window, &rect))
|
if (priv->grip_window != NULL && gtk_window_get_resize_grip_area (window, &rect))
|
||||||
{
|
{
|
||||||
gdk_window_move_resize (priv->grip_window,
|
gdk_window_move_resize (priv->grip_window,
|
||||||
|
Loading…
Reference in New Issue
Block a user