Check preview icon size setting only if header is present

This commit is contained in:
Charles Gagnon
2020-08-02 10:58:06 -04:00
parent 82880fd633
commit f8668dfcde

View File

@@ -822,12 +822,7 @@ var Preview = Utils.defineClass({
this._removeWindowSignals();
this.window = window;
this._needsCloseButton = window.can_close() && !Utils.checkIfWindowHasTransient(window);
if (Me.settings.get_boolean('window-preview-use-custom-icon-size')){
this._updateHeader(Me.settings.get_int('window-preview-custom-icon-size'));
} else {
this._updateHeader(headerHeight / scaleFactor * .6);
}
this._updateHeader();
},
animateOut: function() {
@@ -951,8 +946,11 @@ var Preview = Utils.defineClass({
}
},
_updateHeader: function(iconTextureSize) {
_updateHeader: function() {
if (headerHeight) {
let iconTextureSize = Me.settings.get_boolean('window-preview-use-custom-icon-size') ?
Me.settings.get_int('window-preview-custom-icon-size') :
headerHeight / scaleFactor * .6;
let icon = this._previewMenu.getCurrentAppIcon().app.create_icon_texture(iconTextureSize);
let workspaceIndex = '';
let workspaceStyle = null;