Redesign handling of long-press gesture and context menus

This commit is contained in:
James Babcock committed 2026-07-22 22:45:14 -07:00
1 parent 3452945322
commit afc05d6a19
10 files changed
+455 -56

No files matched your search

+9
View File
@@ -50,6 +50,15 @@ export class SettingsPanelLayer implements Layer {
return this.sections[clamp(this.leftIndex, 0, this.sections.length - 1)]!;
}
/** Select a left-column section by label (deep link, e.g. from an app's menu). */
focusSection(label: string): void {
const index = this.sections.findIndex((section) => section.label === label);
if (index < 0) return;
this.leftIndex = index;
this.focus = "left";
this.resetRight();
}
paint(ctx: LayerContext): GrayImage {
const font = getDefaultSmallFont();
const { width, height } = ctx.stack.getBaseSize();