forked from Blendman974/faceclaw
Various UI tweaks
Fix missing submenu indicators and change their appearance. Clean up styling in the Terminal app and move Settings to the top-level menu. Remove right padding from the bottom bar.
This commit is contained in:
1 parent
eff32d4a5a
commit
295922effd
12 files changed
+95
-96
No files matched your search
@@ -1,14 +1,13 @@
|
||||
import { imageFromAsciiArt } from "../../graphics/image";
|
||||
import { getDefaultSmallFont } from "../../graphics/ui-fonts";
|
||||
import { appViewportSize } from "../../ui/shell/geometry";
|
||||
import { LIST_ROW_TEXT_INSET } from "../../ui/metrics";
|
||||
import {
|
||||
MenuLayer,
|
||||
TextPageLayer,
|
||||
drawRightValueMenuItem,
|
||||
drawSubmenuIndicator,
|
||||
drawToggleMenuItem,
|
||||
openModalMenu,
|
||||
submenuItem,
|
||||
type MenuItem,
|
||||
} from "../../ui/menu";
|
||||
import { enumSettingMenuItem, toggleSettingMenuItem } from "../../ui/dashboard-settings";
|
||||
@@ -73,19 +72,6 @@ const MENU_LAYOUT = {
|
||||
opaque: true,
|
||||
};
|
||||
|
||||
function submenuItem(label: string, onSelect: MenuItem["onSelect"]): MenuItem {
|
||||
return {
|
||||
label,
|
||||
onSelect,
|
||||
render: ({ image, x, y, width, height, selected, disabled, text }) => {
|
||||
const font = getDefaultSmallFont();
|
||||
const value = disabled ? 70 : selected ? 255 : 200;
|
||||
image.drawText(font, x, y + LIST_ROW_TEXT_INSET, text, value);
|
||||
drawSubmenuIndicator(image, font, x, y, width, height, value);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/** Persist a config change and re-apply it live when the array is streaming. */
|
||||
function updateMicConfig(mutate: (config: MicConfig) => MicConfig): void {
|
||||
const updated = mutate(loadMicConfig());
|
||||
|
||||
Reference in new issue
Block a user