forked from Blendman974/faceclaw
Use TTF fonts throughout the UI; also add some more functions to app extension API
This commit is contained in:
1 parent
5abbe2a405
commit
96842ceb23
82 files changed
+2666
-288
No files matched your search
@@ -6,12 +6,7 @@ import {
|
||||
setBooleanSetting,
|
||||
setStringSetting,
|
||||
} from "~/native/settings-store";
|
||||
import {
|
||||
getDefaultSmallFont,
|
||||
UI_FONT_SETTING_KEY,
|
||||
UI_FONT_VALUES,
|
||||
type UiFontChoice,
|
||||
} from "~/graphics/bdffont";
|
||||
import { getDefaultSmallFont } from "~/graphics/ui-fonts";
|
||||
import { wrapText } from "~/graphics/textwrap";
|
||||
import {
|
||||
ASSISTANT_MODEL_VALUES,
|
||||
@@ -217,16 +212,6 @@ export const batteryDisplayModeSetting = new ConfigSettingEnum<BatteryDisplayMod
|
||||
description: "How the top bar shows the phone and glasses battery levels: a small gauge icon or an exact percentage.",
|
||||
});
|
||||
|
||||
export const uiFontSetting = new ConfigSettingEnum<UiFontChoice>({
|
||||
id: "uiFont",
|
||||
label: "Font",
|
||||
storageKey: UI_FONT_SETTING_KEY,
|
||||
defaultValue: "terminus",
|
||||
values: UI_FONT_VALUES,
|
||||
formatValue: uiFontLabel,
|
||||
description: "Typeface for UI text on the glasses. Terminus is fixed-width; TerminusV is a proportional variant that fits more text per line.",
|
||||
});
|
||||
|
||||
export const timeFormatSetting = new ConfigSettingEnum<TimeFormat>({
|
||||
id: "timeFormat",
|
||||
label: "Time format",
|
||||
@@ -631,10 +616,6 @@ export function timeFormatLabel(value: TimeFormat): string {
|
||||
return value === "12h" ? "12-hour" : "24-hour";
|
||||
}
|
||||
|
||||
export function uiFontLabel(value: UiFontChoice): string {
|
||||
return value === "terminusv" ? "TerminusV" : "Terminus";
|
||||
}
|
||||
|
||||
export function loadNightscoutSettings(): NightscoutSettings {
|
||||
return {
|
||||
siteUrl: nightscoutSiteUrlSetting.get(),
|
||||
|
||||
Reference in new issue
Block a user