refactor(views): update AutoScaleMode to DPI in SettingsView and OptionsView

This change ensures better scaling behavior for high-DPI displays by switching from Font-based scaling to DPI-based scaling. The modification improves the visual consistency of the application across different screen resolutions.
This commit is contained in:
Peter
2025-05-13 01:18:42 +10:00
parent ff8f321142
commit 8ec65905b1
2 changed files with 33 additions and 33 deletions
+18 -18
View File
@@ -2,12 +2,12 @@
{
partial class OptionsView
{
/// <summary>
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
@@ -22,8 +22,8 @@
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
@@ -34,9 +34,9 @@
this.btnSettingsMenu = new System.Windows.Forms.Button();
this.panelSettings.SuspendLayout();
this.SuspendLayout();
//
//
// panelSettings
//
//
this.panelSettings.BackColor = System.Drawing.Color.White;
this.panelSettings.Controls.Add(this.panelSubContent);
this.panelSettings.Controls.Add(this.btnAboutMenu);
@@ -46,20 +46,20 @@
this.panelSettings.Name = "panelSettings";
this.panelSettings.Size = new System.Drawing.Size(625, 395);
this.panelSettings.TabIndex = 243;
//
//
// panelSubContent
//
this.panelSubContent.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.panelSubContent.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelSubContent.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelSubContent.Location = new System.Drawing.Point(135, 14);
this.panelSubContent.Name = "panelSubContent";
this.panelSubContent.Size = new System.Drawing.Size(474, 363);
this.panelSubContent.TabIndex = 246;
//
//
// btnAboutMenu
//
//
this.btnAboutMenu.BackColor = System.Drawing.Color.White;
this.btnAboutMenu.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209)))));
this.btnAboutMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -71,9 +71,9 @@
this.btnAboutMenu.Text = "About";
this.btnAboutMenu.UseVisualStyleBackColor = false;
this.btnAboutMenu.Click += new System.EventHandler(this.btnAboutMenu_Click);
//
//
// btnSettingsMenu
//
//
this.btnSettingsMenu.BackColor = System.Drawing.Color.White;
this.btnSettingsMenu.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(153)))), ((int)(((byte)(180)))), ((int)(((byte)(209)))));
this.btnSettingsMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -85,11 +85,11 @@
this.btnSettingsMenu.Text = "Settings";
this.btnSettingsMenu.UseVisualStyleBackColor = false;
this.btnSettingsMenu.Click += new System.EventHandler(this.btnSettingsMenu_Click);
//
//
// OptionsView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.panelSettings);
this.Name = "OptionsView";
this.Size = new System.Drawing.Size(625, 395);
+15 -15
View File
@@ -2,12 +2,12 @@
{
partial class SettingsView
{
/// <summary>
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
@@ -22,8 +22,8 @@
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
@@ -32,9 +32,9 @@
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//
// checkBox1
//
//
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
@@ -45,9 +45,9 @@
this.checkBox1.TabIndex = 0;
this.checkBox1.Text = "Save settings to INI file";
this.checkBox1.UseVisualStyleBackColor = true;
//
//
// checkBox2
//
//
this.checkBox2.AutoSize = true;
this.checkBox2.Checked = true;
this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked;
@@ -58,10 +58,10 @@
this.checkBox2.TabIndex = 1;
this.checkBox2.Text = "Activate Plugins for PowerShell Tooling";
this.checkBox2.UseVisualStyleBackColor = true;
//
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.button1.BackColor = System.Drawing.Color.WhiteSmoke;
this.button1.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro;
@@ -74,11 +74,11 @@
this.button1.Text = "Basic settings";
this.button1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button1.UseVisualStyleBackColor = false;
//
//
// SettingsView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.button1);
this.Controls.Add(this.checkBox2);