forked from Blendman974/faceclaw
Redesign handling of long-press gesture and context menus
This commit is contained in:
1 parent
3452945322
commit
afc05d6a19
10 files changed
+455
-56
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user