Borderless modes have different padding inside the builtin apps

Most of the builtin apps had some padding between the window edge and
their content, because they expect to be displayed with a line border on
their edge. We added a customization option to remove the border, so,
that padding is not always necessary. Make the layouts dynamically
adjust, to omit the padding when it isn't needed.
This commit is contained in:
James Babcock committed 2026-11-11 15:19:29 -08:00
1 parent e158452ba4
commit a02b849200
115 files changed
+3600 -1583

No files matched your search

+3 -12
View File
@@ -12,7 +12,6 @@ import { RingStatusLayer } from "./ring-status";
import { LoadAppFromQrLayer, LoadAppFromUrlLayer } from "./load-app";
import { unicodeTestMenu } from "./unicode-test";
import { type AppContext } from "../app-definition";
import { appViewportSize } from "../../ui/shell/geometry";
import {
createInProcessWindow,
YieldAtRootLayer,
@@ -23,17 +22,9 @@ import {
export const DEVELOPER_WINDOW_ID = "developer";
export const DEVELOPER_SURFACE_ID = "window:developer";
const MENU_LAYOUT = {
x: 8,
y: 8,
width: 272,
showBorder: false,
minHeight: 0,
maxHeight: appViewportSize("min").height - 16,
// These menus are pages, not popups: "Debug tests" replaces the root menu
// visually instead of letting the taller root show through beneath it.
opaque: true,
};
// These menus are pages, not popups: "Debug tests" replaces the root menu
// visually instead of letting the taller root show through beneath it.
const MENU_LAYOUT = { page: true, width: 248 } as const;
type OpenPage = (ctx: Parameters<MenuItem["onSelect"]>[0]) => void;