Commit 6a499f56 authored by Javad Rahmatzadeh's avatar Javad Rahmatzadeh
Browse files

Fix window caption going out of display area when dash is disabled

This issue happens in GNOME Shell 40 and higher
when dash is disabled.

To fix that we push window preview 24 pixel higher (almost
the same height as the the window caption).
parent 814e31e7
......@@ -16,6 +16,7 @@ We go to the next version after each release on [GNOME Shell Extensions website]
- Prefs window size for scaled displays.
- Prefs window size for small displays in GNOME Shell 42.
- Racy prefs window size.
- Window caption going out of display area when dash is disabled in GNOME Shell 40 and higher.
- Russian translation by [@librusekus35790](https://gitlab.gnome.org/librusekus35790).
- Spanish translation by [@Luci](https://gitlab.gnome.org/Luci).
......
......@@ -701,6 +701,8 @@ var API = class
this._main.overview.dash.width = -1;
this._main.overview.dash._maxHeight = -1;
}
this._updateWindowPreviewOverlap();
}
/**
......@@ -723,6 +725,36 @@ var API = class
} else {
this._main.overview.dash.width = 0;
}
this._updateWindowPreviewOverlap();
}
/**
* update window preview overlap
*
* @returns {void}
*/
_updateWindowPreviewOverlap()
{
if (this._shellVersion < 40) {
return;
}
let wpp = this._windowPreview.WindowPreview.prototype;
if (this.isDashVisible() && wpp.overlapHeightsOld) {
wpp.overlapHeights = wpp.overlapHeightsOld;
delete(wpp.overlapHeightsOld);
return;
}
if (!this.isDashVisible()) {
wpp.overlapHeightsOld = wpp.overlapHeights;
wpp.overlapHeights = function () {
let [top, bottom] = this.overlapHeightsOld();
return [top + 24, bottom + 24];
};
}
}
/**
......
......@@ -798,3 +798,4 @@
padding: 0;
margin: 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment