From b61ecb5cb444f57bc9585fb752addd712e21701b Mon Sep 17 00:00:00 2001
From: JelleInfinity <60387522+JelleInfinity@users.noreply.github.com>
Date: Sat, 1 Oct 2022 21:17:27 +0200
Subject: [PATCH] Enable high DPI support (#260)
This fixes blurry fonts
It does require TargetFramework to be net472 tho, I hope that's okay
Enable high DPI support
This fixes blurry fonts
It does require TargetFramework to be net472 tho, I hope that's okay
---
pkNX.WinForms/Main.Designer.cs | 5 +-
pkNX.WinForms/Properties/app.manifest | 76 +++++++++++++++++++++++++++
pkNX.WinForms/app.config | 32 ++++++-----
pkNX.WinForms/pkNX.WinForms.csproj | 39 +++++++-------
4 files changed, 118 insertions(+), 34 deletions(-)
create mode 100644 pkNX.WinForms/Properties/app.manifest
diff --git a/pkNX.WinForms/Main.Designer.cs b/pkNX.WinForms/Main.Designer.cs
index 48b3461c..bf578632 100644
--- a/pkNX.WinForms/Main.Designer.cs
+++ b/pkNX.WinForms/Main.Designer.cs
@@ -187,12 +187,13 @@ private void InitializeComponent()
// Main
//
this.AllowDrop = true;
- this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(144F, 144F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(620, 449);
this.Controls.Add(this.FLP_Controls);
this.Controls.Add(this.TB_Path);
this.Controls.Add(this.menuStrip1);
+ this.DoubleBuffered = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "Main";
diff --git a/pkNX.WinForms/Properties/app.manifest b/pkNX.WinForms/Properties/app.manifest
new file mode 100644
index 00000000..cec3af72
--- /dev/null
+++ b/pkNX.WinForms/Properties/app.manifest
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pkNX.WinForms/app.config b/pkNX.WinForms/app.config
index e702fac5..f48892f5 100644
--- a/pkNX.WinForms/app.config
+++ b/pkNX.WinForms/app.config
@@ -1,18 +1,24 @@
-
+
-
+
-
-
-
-
- 2
-
-
-
-
-
-
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
diff --git a/pkNX.WinForms/pkNX.WinForms.csproj b/pkNX.WinForms/pkNX.WinForms.csproj
index 6f1847df..aa5693e3 100644
--- a/pkNX.WinForms/pkNX.WinForms.csproj
+++ b/pkNX.WinForms/pkNX.WinForms.csproj
@@ -1,7 +1,7 @@
WinExe
- net461
+ net472
true
pkNX.WinForms
Project Pokémon
@@ -14,6 +14,7 @@
10
enable
true
+ Properties\app.manifest
@@ -29,24 +30,24 @@
-
-
- UserControl
-
-
- True
- True
- Resources.resx
-
-
- True
- True
- Settings.settings
-
-
- Form
-
-
+
+
+ UserControl
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ True
+ Settings.settings
+
+
+ Form
+
+