Refine the UI of app-switcher-on-bottom UI

This commit is contained in:
James Babcock committed 2026-10-01 18:31:11 -07:00
1 parent 8f99779f98
commit ee8b98d1b0
6 files changed
+186 -13

No files matched your search

+6 -1
View File
@@ -58,6 +58,7 @@ import {
switcherRowHeight,
uiDepth,
windowBandHeight,
windowFramed,
windowTop,
type WindowHeightMode,
} from "./geometry";
@@ -938,7 +939,7 @@ class Shell {
* foreground window's band (full height for a max-height window, the
* vertical-position-dependent 288px band otherwise) plus the switcher: a
* side strip's icon columns (minus the outer dead strip the one-column
* variant leaves), or the row under it.
* variant leaves), or the row under it and the window frame's sides.
*/
screenshotCropRect(): { x: number; y: number; width: number; height: number } {
const appId = this.foregroundWindow()?.appId;
@@ -950,6 +951,10 @@ class Shell {
left = Math.min(left, strip.left);
right = Math.max(right, strip.right);
}
if (windowFramed(appId)) {
left -= 1;
right += 1;
}
const y = windowTop(heightMode, appId);
const bottom = y + windowBandHeight(heightMode, appId) + switcherRowHeight(appId);
return { x: left, y, width: right - left, height: bottom - y };