[verified] merge upstream c162c8e6 into all-features

This commit is contained in:
MasterControl committed 2026-11-14 23:24:08 +00:00
commit 5790e98d27
176 files changed
+5311 -2307

No files matched your search

+8 -4
View File
@@ -4,6 +4,7 @@ import { flattenPlanes } from "../../graphics/plane";
import { InputEvent } from "../gestures";
import { Layer, LayerActions, LayerContext, LayerStack, PaintBelow } from "../layers";
import { appViewportRect, appViewportSize, SHELL_OPAQUE_BLACK } from "./geometry";
import { uniformEdges, type Viewport, viewportWith } from "../viewport";
// The modal box covers most of the min-height app viewport. Retained vector
// clears optionally hide the app outside its opaque rect. Size and position are
@@ -12,13 +13,16 @@ import { appViewportRect, appViewportSize, SHELL_OPAQUE_BLACK } from "./geometry
const MODAL_MARGIN = 14;
const MODAL_PADDING = 4;
/** Content (inner layer stack) size of the modal box. */
function modalInterior(): { width: number; height: number } {
/**
* The modal box's content (inner layer stack) viewport: every edge is just
* inside the box's border.
*/
function modalInterior(): Viewport {
const viewport = appViewportSize("min");
return {
return viewportWith({
width: viewport.width - 2 * MODAL_MARGIN - 2 * MODAL_PADDING,
height: Math.min(viewport.height - 2 * MODAL_MARGIN, Math.floor(65530 / Math.ceil((viewport.width - 2 * MODAL_MARGIN) / 2))) - 2 * MODAL_PADDING,
};
}, uniformEdges("border"));
}
/** Screen rect of the modal box, aligned to the min-height window band. */