Skip to content

Commit fa4960a

Browse files
committed
systray applet: Use the correct panel size when reloading icons.
In some cases the size was getting scaled multiple times. Just get the icon size from the panel at the time of the redisplay. ref: #11347
1 parent 6ff0149 commit fa4960a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

files/usr/share/cinnamon/applets/[email protected]/applet.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ class CinnamonSystrayApplet extends Applet.Applet {
9999
});
100100
}
101101

102-
resizeIcons(size) {
103-
this.icon_size = size * global.ui_scale;
102+
resizeIcons() {
103+
this.icon_size = this.getPanelIconSize() * global.ui_scale;
104104
Main.statusIconDispatcher.redisplay();
105105
}
106106

107107
on_panel_icon_size_changed(size) {
108-
this.resizeIcons(size);
108+
this.resizeIcons();
109109
}
110110

111111
on_panel_edit_mode_changed() {
112-
this.resizeIcons(this.icon_size);
112+
this.resizeIcons();
113113
}
114114

115115
uiScaleChanged() {
@@ -118,7 +118,7 @@ class CinnamonSystrayApplet extends Applet.Applet {
118118
}
119119

120120
this._scaleUpdateId = Mainloop.timeout_add(1500, () => {
121-
this.resizeIcons(this.getPanelIconSize());
121+
this.resizeIcons();
122122

123123
this._scaleUpdateId = 0;
124124
return GLib.SOURCE_REMOVE;

0 commit comments

Comments
 (0)