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,50 +29,48 @@
</head>
<body onContextMenu="return false;">
<div class="container">
<div>
<h3>Firefox</h3>
<blockquote>
<h4>建立安全连接失败</h4>
<p><small>连接到 github.com 时发生错误。对等端的证书有一个无效的签名。</small> </p>
<p><small> 错误代码SEC_ERROR_BAD_SIGNATURE</small> </p>
</blockquote>
<div>
<h3>Firefox</h3>
<blockquote>
<h4>建立安全连接失败</h4>
<p><small>连接到 github.com 时发生错误。对等端的证书有一个无效的签名。</small> </p>
<p><small> 错误代码SEC_ERROR_BAD_SIGNATURE</small> </p>
</blockquote>
<h4>解决办法</h4>
<p>
<span class="badge">1</span>
<span>地址栏输入:</span><code>about:config</code>
</p>
<p>
<span class="badge">2</span>
<span>输入首选项名称:</span><code>security.enterprise_roots.enabled</code>
</p>
<p>
<span class="badge">3</span>
<span>修改值为:</span><code>true</code>
</p>
</div>
<h4>解决办法</h4>
<p>
<span class="badge">1</span>
<span>地址栏输入:</span><code>about:config</code>
</p>
<p>
<span class="badge">2</span>
<span>输入首选项名称:</span><code>security.enterprise_roots.enabled</code>
</p>
<p>
<span class="badge">3</span>
<span>修改值为:</span><code>true</code>
</p>
</div>
<hr />
<hr />
<div>
<h3>git.exe</h3>
<blockquote>
<h4>clone、pull或push等证书异常</h4>
<p><small>fatal: unable to access 'https://github.com/xxx.git/'</small> </p>
<p><small>SSL certificate problem: unable to get local issuer certificate</small> </p>
</blockquote>
<div>
<h3>git.exe</h3>
<blockquote>
<h4>clone、pull或push等证书异常</h4>
<p><small>fatal: unable to access 'https://github.com/xxx.git/'</small> </p>
<p><small>SSL certificate problem: unable to get local issuer certificate</small> </p>
</blockquote>
<h4>解决办法</h4>
<p>
<span class="badge">1</span>
<span>管理员身份运行:</span><code>cmd</code>
</p>
<p>
<span class="badge">2</span>
<span>在cmd输入</span><code>git config --global http.sslverify false</code>
</p>
</div>
<h4>解决办法</h4>
<p>
<span class="badge">1</span>
<span>管理员身份运行:</span><code>cmd</code>
</p>
<p>
<span class="badge">2</span>
<span>在cmd输入</span><code>git config --global http.sslverify false</code>
</p>
</div>
<script type="text/javascript">