DPI调整

This commit is contained in:
陈国伟 2021-11-29 09:15:27 +08:00
parent 128bf5e58d
commit a13aee0c60
2 changed files with 57 additions and 42 deletions

View File

@ -25,6 +25,7 @@ namespace FastGithub.UI
}
StartFastGithub();
SetWebBrowserDPI();
SetWebBrowserVersion();
var app = new Application();
@ -69,6 +70,21 @@ namespace FastGithub.UI
registryKey.SetValue(name, value, RegistryValueKind.DWord);
}
/// <summary>
/// 设置浏览器DPI
/// </summary>
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);
}
/// <summary>
/// 启动fastgithub
/// </summary>

View File

@ -3,13 +3,14 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" crossorigin="anonymous">
<title>证书验证</title>
<style type="text/css">
body {
overflow-x: hidden;
background-color: #f7f7f7;
padding: 0px 36px;
}
blockquote {
@ -28,7 +29,6 @@
</head>
<body onContextMenu="return false;">
<div class="container">
<div>
<h3>Firefox</h3>
<blockquote>
@ -72,7 +72,6 @@
<span>在cmd输入</span><code>git config --global http.sslverify false</code>
</p>
</div>
</div>
<script type="text/javascript">
var codes = document.getElementsByTagName('code');