forked from Blendman974/faceclaw
Add an option to move the app switcher to the right or bottom, and adjust screen depth if bottom
This commit is contained in:
1 parent
46fded856a
commit
8f99779f98
21 files changed
+827
-286
No files matched your search
@@ -28,6 +28,8 @@ import { drawRightValueMenuItem, openModalMenu, type MenuItem } from "../menu";
|
||||
import { shell } from "../shell/shell";
|
||||
import {
|
||||
anthropicApiKeySetting,
|
||||
appSwitcherPositionSetting,
|
||||
uiDepthSetting,
|
||||
assistantAllowProactiveSetting,
|
||||
assistantBackendSetting,
|
||||
assistantBridgeHostSetting,
|
||||
@@ -84,6 +86,7 @@ export function createSettingsPanelLayer(): SettingsPanelLayer {
|
||||
}
|
||||
|
||||
function settingsSections(): SettingsSection[] {
|
||||
const customizationItems = customizationRows();
|
||||
const sections: SettingsSection[] = [
|
||||
{
|
||||
label: "Display",
|
||||
@@ -107,16 +110,11 @@ function settingsSections(): SettingsSection[] {
|
||||
},
|
||||
{
|
||||
label: "Customization",
|
||||
items: [
|
||||
// Submenu: top-bar battery indicator style plus per-device visibility.
|
||||
batteryIndicatorsMenuItem(),
|
||||
// Submenu: toggles for menu/icon-grid motion and the screen on/off fade.
|
||||
animationsMenuItem(),
|
||||
// Controls the top-bar clock (24-hour vs 12-hour).
|
||||
enumSettingMenuItem(timeFormatSetting),
|
||||
// Opens the modal font picker (face, weight, size) for UI text.
|
||||
uiFontPickerMenuItem(),
|
||||
],
|
||||
// Depth only applies (and only shows) with the app switcher at the
|
||||
// bottom; the panel re-reads the rows each paint.
|
||||
get items() {
|
||||
return customizationItems();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Voice",
|
||||
@@ -234,6 +232,31 @@ function settingsSections(): SettingsSection[] {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* The Customization rows, as a function of the current settings: the same
|
||||
* array while the switcher position stays put, so the panel's menu sees a
|
||||
* stable list between paints.
|
||||
*/
|
||||
function customizationRows(): () => MenuItem[] {
|
||||
// Left / right / bottom edge; the dashboard controller moves (or, to and
|
||||
// from the bottom, resizes) windows on change.
|
||||
const position = enumSettingMenuItem(appSwitcherPositionSetting);
|
||||
// The whole display's stereo depth; the shell sends it with its scene.
|
||||
const depth = enumSettingMenuItem(uiDepthSetting);
|
||||
const rest = [
|
||||
// Submenu: top-bar battery indicator style plus per-device visibility.
|
||||
batteryIndicatorsMenuItem(),
|
||||
// Submenu: toggles for menu/icon-grid motion and the screen on/off fade.
|
||||
animationsMenuItem(),
|
||||
// Controls the top-bar clock (24-hour vs 12-hour).
|
||||
enumSettingMenuItem(timeFormatSetting),
|
||||
// Opens the modal font picker (face, weight, size) for UI text.
|
||||
uiFontPickerMenuItem(),
|
||||
];
|
||||
const withDepth = [position, depth, ...rest], withoutDepth = [position, ...rest];
|
||||
return () => appSwitcherPositionSetting.get() === "bottom" ? withDepth : withoutDepth;
|
||||
}
|
||||
|
||||
function autoBrightnessMenuItem(): MenuItem {
|
||||
return {
|
||||
label: "Auto-brightness",
|
||||
|
||||
@@ -10,7 +10,8 @@ import { shell } from "../shell/shell";
|
||||
|
||||
/**
|
||||
* One left-column entry. `items` are the right-column rows (reusing the shared
|
||||
* MenuItem builders). `renderDetail`, when set, draws custom informational
|
||||
* MenuItem builders); it may be a getter for rows that come and go with other
|
||||
* settings, since the panel re-reads it on every paint. `renderDetail`, when set, draws custom informational
|
||||
* content (e.g. About) at the top of the pane and returns the pixel height it
|
||||
* consumed; the row list renders below it. Returning nothing claims the whole
|
||||
* pane (an info-only section).
|
||||
|
||||
Reference in new issue
Block a user