opt scale

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-11 19:53:11 +08:00
parent 09bd1edeb3
commit 4a2679a589
6 changed files with 142 additions and 39 deletions

View File

@@ -44,10 +44,7 @@ abstract final class PageUtils {
RouteObserver<PageRoute>();
static RelativeRect menuPosition(Offset offset) {
final uiScale = Pref.uiScale;
final dx = offset.dx / uiScale;
final dy = offset.dy / uiScale;
return .fromLTRB(dx, dy, dx, 0);
return .fromLTRB(offset.dx, offset.dy, offset.dx, 0);
}
static Future<void> imageView({

View File

@@ -649,10 +649,8 @@ abstract final class Pref {
static double get defaultTextScale =>
_setting.get(SettingBoxKey.defaultTextScale, defaultValue: 1.0);
static double uiScale = _setting.get(
SettingBoxKey.uiScale,
defaultValue: 1.0,
);
static double get uiScale =>
_setting.get(SettingBoxKey.uiScale, defaultValue: 1.0);
static bool get dynamicsWaterfallFlow =>
_setting.get(SettingBoxKey.dynamicsWaterfallFlow, defaultValue: true);