Use scale factor when resizing preview close button

This commit is contained in:
Charles Gagnon
2019-06-26 21:17:52 -04:00
parent 257f00125a
commit 0b37a3bf75

View File

@@ -745,10 +745,11 @@ var Preview = Utils.defineClass({
adjustOnStage: function() {
let closeButton = this._closeButtonBin.get_first_child();
let closeButtonHeight = closeButton.height;
let maxCloseButtonSize = MAX_CLOSE_BUTTON_SIZE * scaleFactor;
let closeButtonBorderRadius = '';
if (closeButton.height > MAX_CLOSE_BUTTON_SIZE) {
closeButtonHeight = MAX_CLOSE_BUTTON_SIZE;
if (closeButtonHeight > maxCloseButtonSize) {
closeButtonHeight = maxCloseButtonSize;
closeButton.set_size(closeButtonHeight, closeButtonHeight);
}