altTab: Only calculate iconSize once
Right now, _setIconSize() calculates the icon size everytime the preferred height of AppSwitcher is calculated, which happens quite often. Reduce the perfomance impact by only calculating the icon size once. This has the added benefit of preventing unexpected changes to the icon sizes while the switcher is open. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2098>
This commit is contained in:
parent
7f65fa49db
commit
c8f3db31b8
@ -765,7 +765,9 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
||||
}
|
||||
|
||||
vfunc_get_preferred_height(forWidth) {
|
||||
if (!this._iconSize)
|
||||
this._setIconSize();
|
||||
|
||||
return super.vfunc_get_preferred_height(forWidth);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user