Selaa lähdekoodia

Merge pull request #5337 from Silverteal/dpi-patch-1

通过修改 DPI 配置增强多屏幕 DPI 体验
龙腾猫跃 1 vuosi sitten
vanhempi
sitoutus
eaf7a93b52
2 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 2 1
      Plain Craft Launcher 2/App.config
  2. 4 2
      Plain Craft Launcher 2/app.manifest

+ 2 - 1
Plain Craft Launcher 2/App.config

@@ -9,7 +9,8 @@
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
     </startup>
   <runtime>
-	<AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=false" />
+    <AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=false"/>
+    <AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
     <generatePublisherEvidence enabled="false"/>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>

+ 4 - 2
Plain Craft Launcher 2/app.manifest

@@ -48,13 +48,15 @@
        自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
        选择加入。选择加入此设置的 Windows 窗体应用程序(目标设定为 .NET Framework 4.6 )还应
        在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。-->
-  <!--
   <application xmlns="urn:schemas-microsoft-com:asm.v3">
     <windowsSettings>
+      <!-- The combination of below two tags have the following effect : 
+           1. Per-Monitor for >= Windows 10 Anniversary Update
+           2. System < Windows 10 Anniversary Update -->
+      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
       <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
     </windowsSettings>
   </application>
-  -->
 
   <!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
   <dependency>