From a13aee0c606b673d9c55851bc349463d6baf8518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com> Date: Mon, 29 Nov 2021 09:15:27 +0800 Subject: [PATCH] =?UTF-8?q?DPI=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub.UI/Program.cs | 18 ++++++- FastGithub.UI/Resource/issue.html | 81 +++++++++++++++---------------- 2 files changed, 57 insertions(+), 42 deletions(-) diff --git a/FastGithub.UI/Program.cs b/FastGithub.UI/Program.cs index c993431..3a8702b 100644 --- a/FastGithub.UI/Program.cs +++ b/FastGithub.UI/Program.cs @@ -25,6 +25,7 @@ namespace FastGithub.UI } StartFastGithub(); + SetWebBrowserDPI(); SetWebBrowserVersion(); var app = new Application(); @@ -69,12 +70,27 @@ namespace FastGithub.UI registryKey.SetValue(name, value, RegistryValueKind.DWord); } + /// + /// 设置浏览器DPI + /// + private static void SetWebBrowserDPI() + { + const string subKey = @"Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_96DPI_PIXEL"; + var registryKey = Registry.CurrentUser.OpenSubKey(subKey, true); + if (registryKey == null) + { + registryKey = Registry.CurrentUser.CreateSubKey(subKey); + } + var name = $"{Process.GetCurrentProcess().ProcessName}.exe"; + registryKey.SetValue(name, 1, RegistryValueKind.DWord); + } + /// /// 启动fastgithub /// /// private static void StartFastGithub() - { + { if (File.Exists(FASTGITHUB_PATH) == false) { return; diff --git a/FastGithub.UI/Resource/issue.html b/FastGithub.UI/Resource/issue.html index 2dab2e6..fc5a97e 100644 --- a/FastGithub.UI/Resource/issue.html +++ b/FastGithub.UI/Resource/issue.html @@ -3,13 +3,14 @@ - + 证书验证