UI: Linux layout fixes

This commit is contained in:
Souryo 2017-09-17 00:54:30 -04:00
parent 8151fb5445
commit ac4f3a0b00
19 changed files with 56 additions and 29 deletions

View file

@ -30,5 +30,15 @@ namespace Mesen.GUI.Controls
}
}
}
public new SizeF AutoScaleDimensions
{
set
{
if(!Program.IsMono) {
base.AutoScaleDimensions = value;
}
}
}
}
}

View file

@ -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();

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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()
{

View file

@ -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();

View file

@ -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;

View file

@ -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";

View file

@ -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());

View file

@ -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;

View file

@ -120,6 +120,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()
{
this.components = new System.ComponentModel.Container();

View file

@ -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()
{

View file

@ -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));

View file

@ -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;

View file

@ -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());

View file

@ -556,7 +556,7 @@ namespace Mesen.GUI.Forms.Config
//
// 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);

View file

@ -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);