add option to change the preview window icon size

This commit is contained in:
hlechner
2020-07-25 11:36:56 -03:00
parent f32055034f
commit afdb43fcb7
4 changed files with 131 additions and 7 deletions

View File

@@ -822,7 +822,12 @@ var Preview = Utils.defineClass({
this._removeWindowSignals();
this.window = window;
this._needsCloseButton = window.can_close() && !Utils.checkIfWindowHasTransient(window);
this._updateHeader();
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);
}
},
animateOut: function() {
@@ -946,9 +951,8 @@ var Preview = Utils.defineClass({
}
},
_updateHeader: function() {
_updateHeader: function(iconTextureSize) {
if (headerHeight) {
let iconTextureSize = headerHeight / scaleFactor * .6;
let icon = this._previewMenu.getCurrentAppIcon().app.create_icon_texture(iconTextureSize);
let workspaceIndex = '';
let workspaceStyle = null;
@@ -1142,4 +1146,4 @@ function getTweenOpts(opts) {
};
return Utils.mergeObjects(opts || {}, defaults);
}
}