forked from Blendman974/faceclaw
Fancier battery displays: Stacked view, segmenting
This commit is contained in:
1 parent
6f60cda9cc
commit
ca839f45d6
6 files changed
+277
-58
No files matched your search
@@ -35,6 +35,9 @@ import {
|
||||
assistantSkipConfirmationSetting,
|
||||
batteryDisplayModeSetting,
|
||||
brightnessSetting,
|
||||
glassesBatteryVisibilitySetting,
|
||||
phoneBatteryVisibilitySetting,
|
||||
ringBatteryVisibilitySetting,
|
||||
displayModeSetting,
|
||||
navigateDisplayModeSetting,
|
||||
navigateVerticalPositionSetting,
|
||||
@@ -75,7 +78,7 @@ import {
|
||||
} from "../dashboard-settings";
|
||||
import { clearRecentDestinations } from "../../apps/navigate/destinations";
|
||||
import { wearBridge } from "../../native/wear-bridge";
|
||||
import { SettingsPanelLayer, type SettingsSection } from "./settings-panel";
|
||||
import { openSettingsSubMenu, SettingsPanelLayer, type SettingsSection } from "./settings-panel";
|
||||
import { terminalFontPickerMenuItem, uiFontPickerMenuItem } from "../font-picker";
|
||||
|
||||
/** The Settings app's master-detail panel (sections on the left, contents on the right). */
|
||||
@@ -102,8 +105,8 @@ function settingsSections(): SettingsSection[] {
|
||||
enumSettingMenuItem(verticalPositionSetting),
|
||||
// Band / tall / full-panel; the dashboard controller reflows windows.
|
||||
enumSettingMenuItem(displayModeSetting),
|
||||
// Controls the top-bar battery indicators (icon vs percentage).
|
||||
enumSettingMenuItem(batteryDisplayModeSetting),
|
||||
// Submenu: top-bar battery indicator style plus per-device visibility.
|
||||
batteryIndicatorsMenuItem(),
|
||||
// Controls the top-bar clock (24-hour vs 12-hour).
|
||||
enumSettingMenuItem(timeFormatSetting),
|
||||
// Opens the modal font picker (face, weight, size) for UI text.
|
||||
@@ -236,6 +239,38 @@ function settingsSections(): SettingsSection[] {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* The Display section's "Battery indicators" row: opens a modal submenu with
|
||||
* the style (icon / percentage / stacked) and, per device, when its
|
||||
* indicator is visible. The row itself shows the current style.
|
||||
*/
|
||||
function batteryIndicatorsMenuItem(): MenuItem {
|
||||
return {
|
||||
label: "Battery indicators",
|
||||
description:
|
||||
"Top-bar battery indicators for the phone, glasses, and ring: their style, and whether each shows always, only when low, or never.",
|
||||
onSelect: (ctx) => {
|
||||
openSettingsSubMenu(ctx, "Battery indicators", [
|
||||
enumSettingMenuItem(batteryDisplayModeSetting),
|
||||
enumSettingMenuItem(phoneBatteryVisibilitySetting),
|
||||
enumSettingMenuItem(glassesBatteryVisibilitySetting),
|
||||
enumSettingMenuItem(ringBatteryVisibilitySetting),
|
||||
]);
|
||||
},
|
||||
render: ({ image, x, y, width }) => {
|
||||
drawRightValueMenuItem(
|
||||
image,
|
||||
getDefaultSmallFont(),
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
"Battery indicators",
|
||||
batteryDisplayModeSetting.displayValue(),
|
||||
);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const LOCAL_MODEL_GB = `${(LOCAL_MODEL.sizeBytes / 1e9).toFixed(1)}GB`;
|
||||
|
||||
// While a download is running, re-render on progress updates so the row's
|
||||
|
||||
Reference in new issue
Block a user