diff --git a/GUI.NET/Controls/BaseControl.cs b/GUI.NET/Controls/BaseControl.cs index b1ba4e18..c8620f90 100644 --- a/GUI.NET/Controls/BaseControl.cs +++ b/GUI.NET/Controls/BaseControl.cs @@ -30,5 +30,15 @@ namespace Mesen.GUI.Controls } } } + + public new SizeF AutoScaleDimensions + { + set + { + if(!Program.IsMono) { + base.AutoScaleDimensions = value; + } + } + } } } \ No newline at end of file diff --git a/GUI.NET/Controls/MesenNumericUpDown.cs b/GUI.NET/Controls/MesenNumericUpDown.cs index 8ba9c5c1..8388014e 100644 --- a/GUI.NET/Controls/MesenNumericUpDown.cs +++ b/GUI.NET/Controls/MesenNumericUpDown.cs @@ -99,6 +99,7 @@ namespace Mesen.GUI.Controls // MesenNumericUpDown // this.Controls.Add(this.nud); + this.MaximumSize = new Size(10000, 20); this.Name = "MesenNumericUpDown"; this.Size = new System.Drawing.Size(48, 21); ((System.ComponentModel.ISupportInitialize)(this.nud)).EndInit(); diff --git a/GUI.NET/Controls/ctrlHorizontalTrackbar.Designer.cs b/GUI.NET/Controls/ctrlHorizontalTrackbar.Designer.cs index 48e089f8..ce1041ab 100644 --- a/GUI.NET/Controls/ctrlHorizontalTrackbar.Designer.cs +++ b/GUI.NET/Controls/ctrlHorizontalTrackbar.Designer.cs @@ -39,7 +39,7 @@ // this.tableLayoutPanel1.ColumnCount = 2; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 32F)); this.tableLayoutPanel1.Controls.Add(this.trackBar, 0, 1); this.tableLayoutPanel1.Controls.Add(this.lblValue, 1, 1); this.tableLayoutPanel1.Controls.Add(this.lblText, 0, 0); @@ -70,7 +70,6 @@ // lblValue // this.lblValue.Anchor = System.Windows.Forms.AnchorStyles.Top; - this.lblValue.AutoSize = true; this.lblValue.BackColor = System.Drawing.Color.White; this.lblValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblValue.Location = new System.Drawing.Point(171, 20); diff --git a/GUI.NET/Controls/ctrlRecentGames.cs b/GUI.NET/Controls/ctrlRecentGames.cs index 2685be62..f4272624 100644 --- a/GUI.NET/Controls/ctrlRecentGames.cs +++ b/GUI.NET/Controls/ctrlRecentGames.cs @@ -12,10 +12,11 @@ using Mesen.GUI.Config; using System.Drawing.Text; using System.IO.Compression; using Mesen.GUI.Forms; +using Mesen.GUI.Controls; namespace Mesen.GUI.Controls { - public partial class ctrlRecentGames : UserControl + public partial class ctrlRecentGames : BaseControl { public delegate void RecentGameLoadedHandler(RecentGameInfo gameInfo); public event RecentGameLoadedHandler OnRecentGameLoaded; diff --git a/GUI.NET/Controls/ctrlRiskyOption.Designer.cs b/GUI.NET/Controls/ctrlRiskyOption.Designer.cs index 6ac89f22..5a85cf04 100644 --- a/GUI.NET/Controls/ctrlRiskyOption.Designer.cs +++ b/GUI.NET/Controls/ctrlRiskyOption.Designer.cs @@ -35,7 +35,6 @@ // // flowLayoutPanel1 // - this.flowLayoutPanel1.AutoSize = true; this.flowLayoutPanel1.Controls.Add(this.chkOption); this.flowLayoutPanel1.Controls.Add(this.lblNotRecommended); this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; @@ -73,8 +72,9 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; this.Controls.Add(this.flowLayoutPanel1); + this.Dock = System.Windows.Forms.DockStyle.Fill; + this.MinimumSize = new System.Drawing.Size(0, 23); this.Name = "ctrlRiskyOption"; this.Size = new System.Drawing.Size(197, 23); this.flowLayoutPanel1.ResumeLayout(false); diff --git a/GUI.NET/Controls/ctrlRiskyOption.cs b/GUI.NET/Controls/ctrlRiskyOption.cs index a86bf038..a94b4854 100644 --- a/GUI.NET/Controls/ctrlRiskyOption.cs +++ b/GUI.NET/Controls/ctrlRiskyOption.cs @@ -9,10 +9,11 @@ using System.Threading.Tasks; using System.Windows.Forms; using Mesen.GUI.Forms; using System.IO; +using Mesen.GUI.Controls; namespace Mesen.GUI.Controls { - public partial class ctrlRiskyOption : UserControl + public partial class ctrlRiskyOption : BaseControl { public ctrlRiskyOption() { diff --git a/GUI.NET/Controls/ctrlTrackbar.cs b/GUI.NET/Controls/ctrlTrackbar.cs index 5f304848..a856494c 100644 --- a/GUI.NET/Controls/ctrlTrackbar.cs +++ b/GUI.NET/Controls/ctrlTrackbar.cs @@ -24,7 +24,7 @@ namespace Mesen.GUI.Controls if(!Program.IsMono) { this.trackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - } + } } public int Minimum diff --git a/GUI.NET/Debugger/Controls/ctrlConsoleStatus.cs b/GUI.NET/Debugger/Controls/ctrlConsoleStatus.cs index b894b3c0..28eb02f0 100644 --- a/GUI.NET/Debugger/Controls/ctrlConsoleStatus.cs +++ b/GUI.NET/Debugger/Controls/ctrlConsoleStatus.cs @@ -34,6 +34,10 @@ namespace Mesen.GUI.Debugger tmrButton.Enabled = true; } + if(Program.IsMono) { + this.Font = new Font("Microsoft Sans Serif", 7.75F); + } + _cpuBinder.Entity = new CPUState(); _ppuControlBinder.Entity = new PPUControlFlags(); _ppuStatusBinder.Entity = new PPUStatusFlags(); diff --git a/GUI.NET/Debugger/Controls/ctrlHexViewer.cs b/GUI.NET/Debugger/Controls/ctrlHexViewer.cs index d0fa3bb2..c655a50e 100644 --- a/GUI.NET/Debugger/Controls/ctrlHexViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlHexViewer.cs @@ -14,7 +14,7 @@ using static Be.Windows.Forms.DynamicByteProvider; namespace Mesen.GUI.Debugger.Controls { - public partial class ctrlHexViewer : UserControl + public partial class ctrlHexViewer : BaseControl { private FindOptions _findOptions; private StaticByteProvider _byteProvider; diff --git a/GUI.NET/Debugger/Controls/ctrlNametableViewer.Designer.cs b/GUI.NET/Debugger/Controls/ctrlNametableViewer.Designer.cs index 49ec691f..6595c6fd 100644 --- a/GUI.NET/Debugger/Controls/ctrlNametableViewer.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlNametableViewer.Designer.cs @@ -135,13 +135,12 @@ // // grpTileInfo // - this.grpTileInfo.AutoSize = true; this.grpTileInfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.grpTileInfo.Controls.Add(this.tableLayoutPanel2); this.grpTileInfo.Dock = System.Windows.Forms.DockStyle.Fill; this.grpTileInfo.Location = new System.Drawing.Point(519, 3); this.grpTileInfo.Name = "grpTileInfo"; - this.grpTileInfo.Size = new System.Drawing.Size(175, 339); + this.grpTileInfo.Size = new System.Drawing.Size(175, 375); this.grpTileInfo.TabIndex = 4; this.grpTileInfo.TabStop = false; this.grpTileInfo.Text = "Tile Info"; diff --git a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs index 425e8cbd..a460cc49 100644 --- a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs @@ -84,8 +84,6 @@ // // grpSpriteInfo // - this.grpSpriteInfo.AutoSize = true; - this.grpSpriteInfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.grpSpriteInfo.Controls.Add(this.tableLayoutPanel4); this.grpSpriteInfo.Dock = System.Windows.Forms.DockStyle.Fill; this.grpSpriteInfo.Location = new System.Drawing.Point(263, 3); @@ -97,8 +95,6 @@ // // tableLayoutPanel4 // - this.tableLayoutPanel4.AutoSize = true; - this.tableLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel4.ColumnCount = 5; this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); diff --git a/GUI.NET/Debugger/Controls/ctrlTilePalette.cs b/GUI.NET/Debugger/Controls/ctrlTilePalette.cs index af71c1d9..a9b94aa7 100644 --- a/GUI.NET/Debugger/Controls/ctrlTilePalette.cs +++ b/GUI.NET/Debugger/Controls/ctrlTilePalette.cs @@ -13,7 +13,7 @@ using Mesen.GUI.Controls; namespace Mesen.GUI.Debugger.Controls { - public partial class ctrlTilePalette : UserControl + public partial class ctrlTilePalette : BaseControl { private int _selectedPalette = -1; private bool _allowSelection = false; diff --git a/GUI.NET/Forms/BaseForm.cs b/GUI.NET/Forms/BaseForm.cs index 9000435f..c1442d2f 100644 --- a/GUI.NET/Forms/BaseForm.cs +++ b/GUI.NET/Forms/BaseForm.cs @@ -119,6 +119,27 @@ namespace Mesen.GUI.Forms } } } + + public new SizeF AutoScaleDimensions + { + set + { + if(!Program.IsMono) { + base.AutoScaleDimensions = value; + } + } + } + + public new AutoScaleMode AutoScaleMode + { + set { + if(Program.IsMono) { + base.AutoScaleMode = AutoScaleMode.None; + } else { + base.AutoScaleMode = value; + } + } + } private void InitializeComponent() { diff --git a/GUI.NET/Forms/Config/ctrlPathSelection.cs b/GUI.NET/Forms/Config/ctrlPathSelection.cs index 76f3a44a..4e9c1a3b 100644 --- a/GUI.NET/Forms/Config/ctrlPathSelection.cs +++ b/GUI.NET/Forms/Config/ctrlPathSelection.cs @@ -7,10 +7,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using Mesen.GUI.Controls; namespace Mesen.GUI.Forms.Config { - public partial class ctrlPathSelection : UserControl + public partial class ctrlPathSelection : BaseControl { public ctrlPathSelection() { diff --git a/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs b/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs index bc55f3d7..2b5977b2 100644 --- a/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs +++ b/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs @@ -1502,7 +1502,6 @@ namespace Mesen.GUI.Forms.Config // // grpReverb // - this.grpReverb.AutoSize = true; this.grpReverb.Controls.Add(this.tableLayoutPanel5); this.grpReverb.Dock = System.Windows.Forms.DockStyle.Fill; this.grpReverb.Location = new System.Drawing.Point(3, 104); @@ -1514,7 +1513,6 @@ namespace Mesen.GUI.Forms.Config // // tableLayoutPanel5 // - this.tableLayoutPanel5.AutoSize = true; this.tableLayoutPanel5.ColumnCount = 2; this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); diff --git a/GUI.NET/Forms/Config/frmAudioConfig.cs b/GUI.NET/Forms/Config/frmAudioConfig.cs index d24d6924..851920b6 100644 --- a/GUI.NET/Forms/Config/frmAudioConfig.cs +++ b/GUI.NET/Forms/Config/frmAudioConfig.cs @@ -21,6 +21,8 @@ namespace Mesen.GUI.Forms.Config if(!Program.IsMono) { this.trkReverbDelay.BackColor = System.Drawing.SystemColors.ControlLightLight; this.trkReverbStrength.BackColor = System.Drawing.SystemColors.ControlLightLight; + } else { + this.chkEnableEqualizer.BackColor = System.Drawing.SystemColors.Control; } Icon = Properties.Resources.Audio; diff --git a/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs b/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs index e187b82b..0802cd45 100644 --- a/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs +++ b/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs @@ -533,7 +533,6 @@ namespace Mesen.GUI.Forms.Config // // tableLayoutPanel3 // - this.tableLayoutPanel3.AutoSize = true; this.tableLayoutPanel3.ColumnCount = 1; this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel4, 0, 5); @@ -642,7 +641,6 @@ namespace Mesen.GUI.Forms.Config // // grpOverclocking // - this.grpOverclocking.AutoSize = true; this.grpOverclocking.Controls.Add(this.tableLayoutPanel2); this.grpOverclocking.Dock = System.Windows.Forms.DockStyle.Fill; this.grpOverclocking.Location = new System.Drawing.Point(3, 26); @@ -654,7 +652,6 @@ namespace Mesen.GUI.Forms.Config // // tableLayoutPanel2 // - this.tableLayoutPanel2.AutoSize = true; this.tableLayoutPanel2.ColumnCount = 4; this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); @@ -726,7 +723,6 @@ namespace Mesen.GUI.Forms.Config // // grpPpuTiming // - this.grpPpuTiming.AutoSize = true; this.grpPpuTiming.Controls.Add(this.tableLayoutPanel5); this.grpPpuTiming.Dock = System.Windows.Forms.DockStyle.Fill; this.grpPpuTiming.Location = new System.Drawing.Point(3, 77); @@ -738,7 +734,6 @@ namespace Mesen.GUI.Forms.Config // // tableLayoutPanel5 // - this.tableLayoutPanel5.AutoSize = true; this.tableLayoutPanel5.ColumnCount = 2; this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); diff --git a/GUI.NET/Forms/Config/frmPreferences.Designer.cs b/GUI.NET/Forms/Config/frmPreferences.Designer.cs index 26097d2a..328fd2a7 100644 --- a/GUI.NET/Forms/Config/frmPreferences.Designer.cs +++ b/GUI.NET/Forms/Config/frmPreferences.Designer.cs @@ -555,8 +555,8 @@ namespace Mesen.GUI.Forms.Config this.tlpCloudSaveDesc.TabIndex = 0; // // lblGoogleDriveIntegration - // - this.lblGoogleDriveIntegration.AutoSize = true; + // + this.lblGoogleDriveIntegration.Dock = System.Windows.Forms.DockStyle.Top; this.lblGoogleDriveIntegration.Location = new System.Drawing.Point(3, 0); this.lblGoogleDriveIntegration.Name = "lblGoogleDriveIntegration"; this.lblGoogleDriveIntegration.Size = new System.Drawing.Size(464, 52); diff --git a/GUI.NET/Forms/frmHelp.Designer.cs b/GUI.NET/Forms/frmHelp.Designer.cs index a32989b5..5c168667 100644 --- a/GUI.NET/Forms/frmHelp.Designer.cs +++ b/GUI.NET/Forms/frmHelp.Designer.cs @@ -134,21 +134,20 @@ // // lblExample // - this.lblExample.AutoSize = true; this.lblExample.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.lblExample.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.lblExample.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblExample.Dock = System.Windows.Forms.DockStyle.Top; this.lblExample.ForeColor = System.Drawing.SystemColors.HighlightText; this.lblExample.Location = new System.Drawing.Point(3, 0); this.lblExample.Name = "lblExample"; - this.lblExample.Size = new System.Drawing.Size(556, 28); + this.lblExample.Size = new System.Drawing.Size(556, 38); this.lblExample.TabIndex = 0; this.lblExample.Text = "Mesen C:\\Games\\MyGame.nes /fullscreen /VideoFilter=NTSC /VideoScale=2 /OverscanTo" + "p=8 /OverscanBottom=8 /OverscanLeft=0 /OverscanRight=0 /DoNotSaveSettings"; // // lblExplanation // - this.lblExplanation.AutoSize = true; + this.lblExplanation.Dock = System.Windows.Forms.DockStyle.Fill; this.lblExplanation.Location = new System.Drawing.Point(3, 28); this.lblExplanation.Name = "lblExplanation"; this.lblExplanation.Padding = new System.Windows.Forms.Padding(0, 5, 0, 0);