diff --git a/lib/features/home/home.dart b/lib/features/home/home.dart index 8f67a4a1e..931559964 100644 --- a/lib/features/home/home.dart +++ b/lib/features/home/home.dart @@ -151,9 +151,11 @@ class _HomePageState extends State with TrayListener, WindowListener { ///window manager methods void _initWindowManager() async { - final double devicePixelRatio = View.of(context).devicePixelRatio; + final double devicePixelRatio = MediaQuery.of(context).devicePixelRatio; + windowManager.addListener(this); await windowManager.setPreventClose(true); + final double width = 360 * devicePixelRatio; final double height = 712 * devicePixelRatio;