barLevel: Update cached style values before chaining up

St.DrawingArea emits the `repaint` signal on style changes, so
if we chain up first, drawing still happens with the previously
cached values.

Part-of:
<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3376>
(cherry picked from commit 1bab7b32e5)
This commit is contained in:
Florian Müllner 2024-06-20 14:32:17 +02:00
parent 406d5f29f0
commit 937691c858
No known key found for this signature in database

View file

@ -108,8 +108,6 @@ export const BarLevel = GObject.registerClass({
}
vfunc_style_changed() {
super.vfunc_style_changed();
const themeNode = this.get_theme_node();
this._barLevelHeight = themeNode.get_length('-barlevel-height');
this._barLevelBorderWidth =
@ -135,6 +133,8 @@ export const BarLevel = GObject.registerClass({
themeNode.lookup_color('-barlevel-overdrive-border-color', false);
this._barLevelOverdriveBorderColor = hasOverdriveBorderColor
? barLevelOverdriveBorderColor : this._barLevelOverdriveColor;
super.vfunc_style_changed();
}
vfunc_repaint() {