forked from Blendman974/faceclaw
Animations have a speed setting rather than an on/off toggle
This commit is contained in:
1 parent
682a8e964d
commit
9b0bf77d79
15 files changed
+110
-45
No files matched your search
+3
-2
@@ -1,8 +1,9 @@
|
||||
import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage, type UiFont } from "../graphics/image";
|
||||
import { wrapText } from "../graphics/textwrap";
|
||||
import { getDefaultSmallFont } from "../graphics/ui-fonts";
|
||||
import { getBooleanSetting } from "../native/settings-store";
|
||||
import { getStringSetting } from "../native/settings-store";
|
||||
import { clamp } from "../util/numeric-util";
|
||||
import { normalizeAnimationSpeed } from "./animation-speed";
|
||||
import { Layer, LayerContext, PaintBelow } from "./layers";
|
||||
import { MENU_ANIMATION_KEY, setMenuAnimationReader } from "./menu-animation-pref";
|
||||
import { Menu, MENU_HIGHLIGHT_FILL, MENU_HIGHLIGHT_STROKE } from "./menu-core";
|
||||
@@ -12,7 +13,7 @@ import { LIST_ROW_TEXT_INSET, centeredTextY, lineStep, listRowHeight, menuTitleH
|
||||
|
||||
// Menu<T> and IconGrid consult this (through their motion classes) at each
|
||||
// paint; a SharedPreferences read, so changes apply to the next navigation.
|
||||
setMenuAnimationReader(() => getBooleanSetting(MENU_ANIMATION_KEY, true));
|
||||
setMenuAnimationReader(() => normalizeAnimationSpeed(getStringSetting(MENU_ANIMATION_KEY, "normal")));
|
||||
|
||||
const DEFAULT_MENU_X = 8;
|
||||
const DEFAULT_MENU_Y = 8;
|
||||
|
||||
Reference in new issue
Block a user