File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ SendMessage
9797IsWindowVisible
9898COPYDATASTRUCT
9999WINDOW_LONG_PTR_INDEX
100- GetDpiForWindow
101100CallWindowProc
102101MINMAXINFO
103102SUBCLASSPROC
Original file line number Diff line number Diff line change 44using Microsoft . UI . Xaml . Controls ;
55using System . Runtime . InteropServices ;
66using Windows . ApplicationModel . DataTransfer ;
7+ using Windows . Win32 ;
8+ using Windows . Win32 . Foundation ;
79
810namespace Files . App . Data . Models
911{
@@ -127,10 +129,9 @@ public string PCloudDrivePath
127129
128130 /// <summary>
129131 /// Gets or sets a value indicating the AppWindow DPI.
130- /// TODO update value if the DPI changes
131132 /// </summary>
132- private float _AppWindowDPI = Win32PInvoke . GetDpiForWindow ( MainWindow . Instance . WindowHandle ) / 96f ;
133- public float AppWindowDPI
133+ private float _AppWindowDPI = PInvoke . GetDpiForWindow ( ( HWND ) MainWindow . Instance . WindowHandle ) / 96f ;
134+ public float AppWindowDPI // TODO: Update value if the DPI changes
134135 {
135136 get => _AppWindowDPI ;
136137 set => SetProperty ( ref _AppWindowDPI , value ) ;
Original file line number Diff line number Diff line change @@ -76,11 +76,6 @@ public static extern bool SetEvent(
7676 IntPtr hEvent
7777 ) ;
7878
79- [ DllImport ( "user32.dll" , SetLastError = true , CharSet = CharSet . Unicode ) ]
80- public static extern int GetDpiForWindow (
81- IntPtr hwnd
82- ) ;
83-
8479 [ DllImport ( "ole32.dll" ) ]
8580 public static extern uint CoWaitForMultipleObjects (
8681 uint dwFlags ,
You can’t perform that action at this time.
0 commit comments