diff --git a/src/client/gui/lib/extensions.dart b/src/client/gui/lib/extensions.dart index 90f307e722..2c3ffed4dc 100644 --- a/src/client/gui/lib/extensions.dart +++ b/src/client/gui/lib/extensions.dart @@ -107,19 +107,3 @@ extension NullableMap on T? { } } } - -// needed because in release mode Flutter does not emit the actual code for toString for some classes -// instead the returned strings are of type "Instance of ''" -// this is done to reduce binary size, and it cannot be turned off :face-with-rolling-eyes: -// see https://api.flutter.dev/flutter/dart-ui/keepToString-constant.html for more info -extension SizeActualString on Size { - String s() { - return 'Size(${width.toStringAsFixed(1)}, ${height.toStringAsFixed(1)})'; - } -} - -extension RectActualString on Rect { - String s() { - return 'Rect.fromLTRB(${left.toStringAsFixed(1)}, ${top.toStringAsFixed(1)}, ${right.toStringAsFixed(1)}, ${bottom.toStringAsFixed(1)})'; - } -} diff --git a/src/client/gui/lib/platform/linux.dart b/src/client/gui/lib/platform/linux.dart index 47d1cb5e99..335a49d9e7 100644 --- a/src/client/gui/lib/platform/linux.dart +++ b/src/client/gui/lib/platform/linux.dart @@ -59,9 +59,6 @@ class LinuxPlatform extends MpPlatform { String? get homeDirectory => Platform.environment['SNAP'] == null ? Platform.environment['HOME'] : Platform.environment['SNAP_REAL_HOME']; - - @override - bool get multiplyScreenScaleFactor => true; } class LinuxAutostartNotifier extends AutostartNotifier { diff --git a/src/client/gui/lib/platform/macos.dart b/src/client/gui/lib/platform/macos.dart index a94a895cea..b26974be29 100644 --- a/src/client/gui/lib/platform/macos.dart +++ b/src/client/gui/lib/platform/macos.dart @@ -59,9 +59,6 @@ class MacOSPlatform extends MpPlatform { @override String? get homeDirectory => Platform.environment['HOME']; - - @override - bool get multiplyScreenScaleFactor => false; } class MacOSAutostartNotifier extends AutostartNotifier { diff --git a/src/client/gui/lib/platform/platform.dart b/src/client/gui/lib/platform/platform.dart index 870461752a..c9597ac391 100644 --- a/src/client/gui/lib/platform/platform.dart +++ b/src/client/gui/lib/platform/platform.dart @@ -27,8 +27,6 @@ abstract class MpPlatform { String get metaKey => 'Meta'; String? get homeDirectory; - - bool get multiplyScreenScaleFactor; } MpPlatform _getPlatform() { diff --git a/src/client/gui/lib/platform/windows.dart b/src/client/gui/lib/platform/windows.dart index e0b3589e86..1745ca0cd3 100644 --- a/src/client/gui/lib/platform/windows.dart +++ b/src/client/gui/lib/platform/windows.dart @@ -59,9 +59,6 @@ class WindowsPlatform extends MpPlatform { @override String? get homeDirectory => Platform.environment['USERPROFILE']; - - @override - bool get multiplyScreenScaleFactor => true; } class WindowsAutostartNotifier extends AutostartNotifier { diff --git a/src/client/gui/lib/window_size.dart b/src/client/gui/lib/window_size.dart index 170ef361a7..801071ff26 100644 --- a/src/client/gui/lib/window_size.dart +++ b/src/client/gui/lib/window_size.dart @@ -6,7 +6,6 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:window_manager/window_manager.dart'; import 'package:window_size/window_size.dart'; -import 'extensions.dart'; import 'logger.dart'; const windowWidthKey = 'windowWidth'; @@ -79,3 +78,19 @@ Size computeDefaultWindowSize(Size? screenSize) { logger.d('Computed default window size: ${size.s()}'); return size; } + +// needed because in release mode Flutter does not emit the actual code for toString for some classes +// instead the returned strings are of type "Instance of ''" +// this is done to reduce binary size, and it cannot be turned off :face-with-rolling-eyes: +// see https://api.flutter.dev/flutter/dart-ui/keepToString-constant.html for more info +extension on Size { + String s() { + return 'Size(${width.toStringAsFixed(1)}, ${height.toStringAsFixed(1)})'; + } +} + +extension on Rect { + String s() { + return 'Rect.fromLTRB(${left.toStringAsFixed(1)}, ${top.toStringAsFixed(1)}, ${right.toStringAsFixed(1)}, ${bottom.toStringAsFixed(1)})'; + } +}