[gnome-shell] st/widget: Emit "style-changed" on all theme changes
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st/widget: Emit "style-changed" on all theme changes
- Date: Mon, 14 Feb 2022 13:53:57 +0000 (UTC)
commit ba547ec1db9015efdef5891f931a714095f2a22a
Author: Jonas Dreßler <verdre v0yd nl>
Date: Mon Nov 18 00:44:36 2019 +0100
st/widget: Emit "style-changed" on all theme changes
Since now the resource consumption of the "style-changed" signal
handlers should be significantly lower, we can start emitting the signal
in all cases again as it was originally intended. This fixes some small
visual issues, like the battery percentage in the panel only being shown
on hover or updating the size of StIcons on scale-factor changes.
This effectively reverts f74c07b9acbdc6945ca37f86bc680701f048f174
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1708
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2099>
src/st/st-widget.c | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index 69bf86c5d9..e131a5108a 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -1740,29 +1740,7 @@ st_widget_recompute_style (StWidget *widget,
st_theme_node_paint_state_invalidate (current_paint_state (widget));
}
- /* It is very likely that custom CSS properties are used with StDrawingArea
- to control the custom drawing, so never omit the ::style-changed signal */
- if (paint_equal)
- paint_equal = !ST_IS_DRAWING_AREA (widget);
-
- if (paint_equal && old_theme_node->font_desc != NULL)
- paint_equal = pango_font_description_equal (old_theme_node->font_desc,
- st_theme_node_get_font (new_theme_node));
-
- if (paint_equal && old_theme_node->foreground_computed)
- {
- ClutterColor col;
-
- st_theme_node_get_foreground_color (new_theme_node, &col);
- paint_equal = clutter_color_equal (&old_theme_node->foreground_color, &col);
- }
-
- if (paint_equal && old_theme_node->icon_colors)
- paint_equal = st_icon_colors_equal (old_theme_node->icon_colors,
- st_theme_node_get_icon_colors (new_theme_node));
-
- if (!paint_equal || !geometry_equal)
- g_signal_emit (widget, signals[STYLE_CHANGED], 0);
+ g_signal_emit (widget, signals[STYLE_CHANGED], 0);
priv->is_style_dirty = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]