From 76c4af0ec33879107a6b250510f5a3069d4986ff Mon Sep 17 00:00:00 2001 From: Jim Westfall Date: Sat, 1 Nov 2014 17:05:14 -0700 Subject: [PATCH] Additional Mono rendering fixes - on initial rendering mono likes to send a resize event where the width is 0, ignore it. This was causing gbDatInfo to not render until a manual resize was done. - set AutoScaleMode to System.Windows.Forms.AutoScaleMode.None. This fixes a number of rendering issues under mono and didnt seem to have any negative effect under c#/windows builds. - tweak some of the initial form sizes and locations on FrmMain. A number of the setting didnt make sense based on the size of the panel they were put it. This resolves an issue with the gbDatInfo and gbSetInfo starting off with the wrong size under mono. --- ROMVault2/FrmHelpAbout.Designer.cs | 2 +- ROMVault2/FrmKey.Designer.cs | 2 +- ROMVault2/FrmMain.Designer.cs | 16 ++++++++-------- ROMVault2/FrmMain.cs | 6 ++++++ ROMVault2/FrmProgressWindow.Designer.cs | 2 +- ROMVault2/FrmProgressWindowFix.Designer.cs | 2 +- ROMVault2/FrmRegistration.Designer.cs | 2 +- ROMVault2/FrmSetDir.Designer.cs | 2 +- ROMVault2/FrmSettings.Designer.cs | 2 +- ROMVault2/FrmShowError.Designer.cs | 2 +- ROMVault2/FrmSplashScreen.Designer.cs | 2 +- ROMVault2/rvTree.Designer.cs | 2 +- 12 files changed, 24 insertions(+), 18 deletions(-) diff --git a/ROMVault2/FrmHelpAbout.Designer.cs b/ROMVault2/FrmHelpAbout.Designer.cs index 0bf9571..ea98129 100644 --- a/ROMVault2/FrmHelpAbout.Designer.cs +++ b/ROMVault2/FrmHelpAbout.Designer.cs @@ -70,7 +70,7 @@ // FrmHelpAbout // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackgroundImage = global::ROMVault2.rvImages.romvaultTZ; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(471, 172); diff --git a/ROMVault2/FrmKey.Designer.cs b/ROMVault2/FrmKey.Designer.cs index 81679fb..63f7c3e 100644 --- a/ROMVault2/FrmKey.Designer.cs +++ b/ROMVault2/FrmKey.Designer.cs @@ -34,7 +34,7 @@ // FrmKey // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.SystemColors.ControlDark; this.ClientSize = new System.Drawing.Size(600, 532); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; diff --git a/ROMVault2/FrmMain.Designer.cs b/ROMVault2/FrmMain.Designer.cs index 2bbf160..41b8e01 100644 --- a/ROMVault2/FrmMain.Designer.cs +++ b/ROMVault2/FrmMain.Designer.cs @@ -286,7 +286,7 @@ this.gbDatInfo.Controls.Add(this.label8); this.gbDatInfo.Location = new System.Drawing.Point(5, 0); this.gbDatInfo.Name = "gbDatInfo"; - this.gbDatInfo.Size = new System.Drawing.Size(440, 147); + this.gbDatInfo.Size = new System.Drawing.Size(468, 147); this.gbDatInfo.TabIndex = 3; this.gbDatInfo.TabStop = false; this.gbDatInfo.Text = "Dat Info :"; @@ -517,7 +517,7 @@ // // btnColorKey // - this.btnColorKey.Location = new System.Drawing.Point(568, 85); + this.btnColorKey.Location = new System.Drawing.Point(547, 85); this.btnColorKey.Name = "btnColorKey"; this.btnColorKey.Size = new System.Drawing.Size(89, 23); this.btnColorKey.TabIndex = 9; @@ -528,7 +528,7 @@ // chkBoxShowMerged // this.chkBoxShowMerged.AutoSize = true; - this.chkBoxShowMerged.Location = new System.Drawing.Point(568, 68); + this.chkBoxShowMerged.Location = new System.Drawing.Point(547, 68); this.chkBoxShowMerged.Name = "chkBoxShowMerged"; this.chkBoxShowMerged.Size = new System.Drawing.Size(125, 17); this.chkBoxShowMerged.TabIndex = 8; @@ -541,7 +541,7 @@ this.chkBoxShowFixed.AutoSize = true; this.chkBoxShowFixed.Checked = true; this.chkBoxShowFixed.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkBoxShowFixed.Location = new System.Drawing.Point(568, 52); + this.chkBoxShowFixed.Location = new System.Drawing.Point(547, 52); this.chkBoxShowFixed.Name = "chkBoxShowFixed"; this.chkBoxShowFixed.Size = new System.Drawing.Size(102, 17); this.chkBoxShowFixed.TabIndex = 7; @@ -554,7 +554,7 @@ this.chkBoxShowMissing.AutoSize = true; this.chkBoxShowMissing.Checked = true; this.chkBoxShowMissing.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkBoxShowMissing.Location = new System.Drawing.Point(568, 36); + this.chkBoxShowMissing.Location = new System.Drawing.Point(547, 36); this.chkBoxShowMissing.Name = "chkBoxShowMissing"; this.chkBoxShowMissing.Size = new System.Drawing.Size(124, 17); this.chkBoxShowMissing.TabIndex = 6; @@ -567,7 +567,7 @@ this.chkBoxShowCorrect.AutoSize = true; this.chkBoxShowCorrect.Checked = true; this.chkBoxShowCorrect.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkBoxShowCorrect.Location = new System.Drawing.Point(568, 20); + this.chkBoxShowCorrect.Location = new System.Drawing.Point(547, 20); this.chkBoxShowCorrect.Name = "chkBoxShowCorrect"; this.chkBoxShowCorrect.Size = new System.Drawing.Size(123, 17); this.chkBoxShowCorrect.TabIndex = 5; @@ -579,7 +579,7 @@ // this.gbSetInfo.Location = new System.Drawing.Point(5, 0); this.gbSetInfo.Name = "gbSetInfo"; - this.gbSetInfo.Size = new System.Drawing.Size(416, 147); + this.gbSetInfo.Size = new System.Drawing.Size(532, 147); this.gbSetInfo.TabIndex = 4; this.gbSetInfo.TabStop = false; this.gbSetInfo.Text = "Game Info :"; @@ -987,7 +987,7 @@ // FrmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(1264, 762); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.menuStrip1); diff --git a/ROMVault2/FrmMain.cs b/ROMVault2/FrmMain.cs index 884be82..412af1f 100644 --- a/ROMVault2/FrmMain.cs +++ b/ROMVault2/FrmMain.cs @@ -479,6 +479,9 @@ namespace ROMVault2 private void splitContainer3_Panel1_Resize(object sender, EventArgs e) { + // fixes a rendering issue in mono + if (splitContainer3.Panel1.Width == 0) return; + gbDatInfo.Width = splitContainer3.Panel1.Width - (gbDatInfo.Left * 2); } @@ -737,6 +740,9 @@ namespace ROMVault2 private void splitContainer4_Panel1_Resize(object sender, EventArgs e) { + // fixes a rendering issue in mono + if (splitContainer4.Panel1.Width == 0) return; + int chkLeft = splitContainer4.Panel1.Width - 150; if (chkLeft < 430) chkLeft = 430; diff --git a/ROMVault2/FrmProgressWindow.Designer.cs b/ROMVault2/FrmProgressWindow.Designer.cs index 56868a2..f9b0d25 100644 --- a/ROMVault2/FrmProgressWindow.Designer.cs +++ b/ROMVault2/FrmProgressWindow.Designer.cs @@ -185,7 +185,7 @@ // FrmProgressWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(591, 320); this.Controls.Add(this.splitContainer1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); diff --git a/ROMVault2/FrmProgressWindowFix.Designer.cs b/ROMVault2/FrmProgressWindowFix.Designer.cs index 59397e0..97c8e40 100644 --- a/ROMVault2/FrmProgressWindowFix.Designer.cs +++ b/ROMVault2/FrmProgressWindowFix.Designer.cs @@ -244,7 +244,7 @@ // FrmProgressWindowFix // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(1027, 500); this.Controls.Add(this.splitContainer1); diff --git a/ROMVault2/FrmRegistration.Designer.cs b/ROMVault2/FrmRegistration.Designer.cs index bb0ccaf..050e5b9 100644 --- a/ROMVault2/FrmRegistration.Designer.cs +++ b/ROMVault2/FrmRegistration.Designer.cs @@ -91,7 +91,7 @@ // FrmRegistration // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(444, 178); this.ControlBox = false; this.Controls.Add(this.btnOK); diff --git a/ROMVault2/FrmSetDir.Designer.cs b/ROMVault2/FrmSetDir.Designer.cs index 202169f..f697cbc 100644 --- a/ROMVault2/FrmSetDir.Designer.cs +++ b/ROMVault2/FrmSetDir.Designer.cs @@ -198,7 +198,7 @@ // FrmSetDir // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(694, 391); this.Controls.Add(this.btnResetAll); this.Controls.Add(this.btnClose); diff --git a/ROMVault2/FrmSettings.Designer.cs b/ROMVault2/FrmSettings.Designer.cs index 742994e..49a71a1 100644 --- a/ROMVault2/FrmSettings.Designer.cs +++ b/ROMVault2/FrmSettings.Designer.cs @@ -220,7 +220,7 @@ // FrmSettings // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(545, 346); this.Controls.Add(this.chkDoubleCheckDelete); this.Controls.Add(this.label5); diff --git a/ROMVault2/FrmShowError.Designer.cs b/ROMVault2/FrmShowError.Designer.cs index 6e8fa58..16b852c 100644 --- a/ROMVault2/FrmShowError.Designer.cs +++ b/ROMVault2/FrmShowError.Designer.cs @@ -65,7 +65,7 @@ // FrmShowError // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(589, 583); this.Controls.Add(this.label1); this.Controls.Add(this.button1); diff --git a/ROMVault2/FrmSplashScreen.Designer.cs b/ROMVault2/FrmSplashScreen.Designer.cs index 04ae6d7..0925cb5 100644 --- a/ROMVault2/FrmSplashScreen.Designer.cs +++ b/ROMVault2/FrmSplashScreen.Designer.cs @@ -86,7 +86,7 @@ // FrmSplashScreen // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(465, 207); diff --git a/ROMVault2/rvTree.Designer.cs b/ROMVault2/rvTree.Designer.cs index 5dff86c..efcfd33 100644 --- a/ROMVault2/rvTree.Designer.cs +++ b/ROMVault2/rvTree.Designer.cs @@ -33,7 +33,7 @@ // rvTree // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.DoubleBuffered = true; this.Name = "RvTree";