mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-07 02:17:10 +02:00
- fixed issue with high-res displays / Windows display scaling other than 100% aka 96dpi, that caused columns to
become wider every time the program was started.
This commit is contained in:
2
source/ChanSort/MainForm.Designer.cs
generated
2
source/ChanSort/MainForm.Designer.cs
generated
@@ -2189,7 +2189,7 @@
|
||||
this.Controls.Add(this.barDockControlTop);
|
||||
this.Name = "MainForm";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.MainForm_Load);
|
||||
this.Shown += new System.EventHandler(this.MainForm_Shown);
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.MainForm_DragDrop);
|
||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.MainForm_DragEnter);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit();
|
||||
|
||||
@@ -1297,13 +1297,25 @@ namespace ChanSort.Ui
|
||||
|
||||
if (Config.Default.LeftGridLayout != null)
|
||||
{
|
||||
this.gridLeft.ForceInitialize();
|
||||
var xml = Config.Default.LeftGridLayout;
|
||||
this.gviewLeft.LoadLayoutFromXml(xml);
|
||||
if (Config.Default.ScaleFactor.Width != 0)
|
||||
{
|
||||
foreach (GridColumn col in this.gviewLeft.Columns)
|
||||
col.Width = (int) (col.Width / Config.Default.ScaleFactor.Width);
|
||||
}
|
||||
}
|
||||
if (Config.Default.RightGridLayout != null)
|
||||
{
|
||||
this.gridRight.ForceInitialize();
|
||||
var xml = Config.Default.RightGridLayout;
|
||||
this.gviewRight.LoadLayoutFromXml(xml);
|
||||
if (Config.Default.ScaleFactor.Width != 0)
|
||||
{
|
||||
foreach (GridColumn col in this.gviewRight.Columns)
|
||||
col.Width = (int)(col.Width / Config.Default.ScaleFactor.Width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1928,9 +1940,9 @@ namespace ChanSort.Ui
|
||||
|
||||
// UI events
|
||||
|
||||
#region MainForm_Load
|
||||
#region MainForm_Shown
|
||||
|
||||
private void MainForm_Load(object sender, EventArgs e)
|
||||
private void MainForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
this.TryExecute(this.LoadSettings);
|
||||
this.TryExecute(this.InitAppAfterMainWindowWasShown);
|
||||
@@ -2686,6 +2698,7 @@ namespace ChanSort.Ui
|
||||
Config.Default.CheckForUpdates = this.miCheckUpdates.Down;
|
||||
Config.Default.LeftGridLayout = this.gviewLeft.SaveLayoutToXml();
|
||||
Config.Default.RightGridLayout = this.gviewRight.SaveLayoutToXml();
|
||||
Config.Default.ScaleFactor = this.absScaleFactor;
|
||||
|
||||
Config.Default.Save();
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace ChanSort.Ui.Properties
|
||||
public int FontSizeDelta { get; set; }
|
||||
public string LeftGridLayout { get; set; }
|
||||
public string RightGridLayout { get; set; }
|
||||
public SizeF ScaleFactor { get; set; }
|
||||
|
||||
private bool allowSave = true;
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
ChanSort Change Log
|
||||
===================
|
||||
|
||||
2021-05-01_1615
|
||||
- fixed issue with high-res displays / Windows display scaling other than 100% aka 96dpi, that caused columns to
|
||||
become wider every time the program was started.
|
||||
|
||||
2021-05-01
|
||||
- added "Settings / Reset to defaults and restart" function to delete the stored customized settings in case something
|
||||
went wrong (like massively oversized column widths)
|
||||
|
||||
Reference in New Issue
Block a user