From 693b42093659cbaa0acc1942e5f875f869c04169 Mon Sep 17 00:00:00 2001 From: atavism Date: Thu, 3 Oct 2024 07:28:33 -0700 Subject: [PATCH] clean-ups --- lib/features/home/home.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;