Multi-disk Bundler: Fix DPI scaling issues and improve control positioning.
This commit is contained in:
parent
2059558771
commit
b0141c516e
|
@ -120,26 +120,26 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void AddButton_Click(object sender, EventArgs e)
|
private void AddButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int start = 5 + (FileSelectorPanel.Controls.Count * 43);
|
int start = 3 + (FileSelectorPanel.Controls.Count * 43);
|
||||||
|
|
||||||
var groupBox = new GroupBox
|
var groupBox = new GroupBox
|
||||||
{
|
{
|
||||||
Text = "",
|
Text = "",
|
||||||
Location = new Point(5, start),
|
Location = UIHelper.Scale(new Point(6, start)),
|
||||||
Size = new Size(435, 38),
|
Size = new Size(FileSelectorPanel.ClientSize.Width - UIHelper.ScaleX(12), UIHelper.ScaleY(41)),
|
||||||
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top
|
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top
|
||||||
};
|
};
|
||||||
|
|
||||||
var mdf = new MultiDiskFileSelector
|
var mdf = new MultiDiskFileSelector
|
||||||
{
|
{
|
||||||
Location = new Point(5, 8),
|
Location = UIHelper.Scale(new Point(7, 12)),
|
||||||
|
Width = groupBox.ClientSize.Width - UIHelper.ScaleX(13),
|
||||||
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top
|
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top
|
||||||
};
|
};
|
||||||
|
|
||||||
mdf.NameChanged += FileSelector_NameChanged;
|
mdf.NameChanged += FileSelector_NameChanged;
|
||||||
|
|
||||||
groupBox.Controls.Add(mdf);
|
groupBox.Controls.Add(mdf);
|
||||||
//grpMulti.Controls.Add(mdf);
|
|
||||||
|
|
||||||
FileSelectorPanel.Controls.Add(groupBox);
|
FileSelectorPanel.Controls.Add(groupBox);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,41 +28,41 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.button1 = new System.Windows.Forms.Button();
|
this.BrowseButton = new System.Windows.Forms.Button();
|
||||||
this.PathBox = new System.Windows.Forms.TextBox();
|
this.PathBox = new System.Windows.Forms.TextBox();
|
||||||
this.UseCurrentRomButton = new System.Windows.Forms.Button();
|
this.UseCurrentRomButton = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// button1
|
// BrowseButton
|
||||||
//
|
//
|
||||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.BrowseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.button1.Location = new System.Drawing.Point(290, 3);
|
this.BrowseButton.Location = new System.Drawing.Point(294, 0);
|
||||||
this.button1.Name = "button1";
|
this.BrowseButton.Name = "BrowseButton";
|
||||||
this.button1.Size = new System.Drawing.Size(60, 23);
|
this.BrowseButton.Size = new System.Drawing.Size(66, 23);
|
||||||
this.button1.TabIndex = 2;
|
this.BrowseButton.TabIndex = 2;
|
||||||
this.button1.Text = "Browse...";
|
this.BrowseButton.Text = "Browse...";
|
||||||
this.button1.UseVisualStyleBackColor = true;
|
this.BrowseButton.UseVisualStyleBackColor = true;
|
||||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
this.BrowseButton.Click += new System.EventHandler(this.BrowseButton_Click);
|
||||||
//
|
//
|
||||||
// PathBox
|
// PathBox
|
||||||
//
|
//
|
||||||
this.PathBox.AllowDrop = true;
|
this.PathBox.AllowDrop = true;
|
||||||
this.PathBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.PathBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.PathBox.Location = new System.Drawing.Point(3, 5);
|
this.PathBox.Location = new System.Drawing.Point(0, 1);
|
||||||
this.PathBox.Name = "PathBox";
|
this.PathBox.Name = "PathBox";
|
||||||
this.PathBox.Size = new System.Drawing.Size(285, 20);
|
this.PathBox.Size = new System.Drawing.Size(288, 20);
|
||||||
this.PathBox.TabIndex = 1;
|
this.PathBox.TabIndex = 1;
|
||||||
this.PathBox.TextChanged += new System.EventHandler(this.PathBox_TextChanged);
|
this.PathBox.TextChanged += new System.EventHandler(this.PathBox_TextChanged);
|
||||||
this.PathBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.textBox1_DragDrop);
|
this.PathBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.PathBox_DragDrop);
|
||||||
this.PathBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.textBox1_DragEnter);
|
this.PathBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.PathBox_DragEnter);
|
||||||
//
|
//
|
||||||
// UseCurrentRomButton
|
// UseCurrentRomButton
|
||||||
//
|
//
|
||||||
this.UseCurrentRomButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.UseCurrentRomButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.UseCurrentRomButton.Location = new System.Drawing.Point(357, 3);
|
this.UseCurrentRomButton.Location = new System.Drawing.Point(364, 0);
|
||||||
this.UseCurrentRomButton.Name = "UseCurrentRomButton";
|
this.UseCurrentRomButton.Name = "UseCurrentRomButton";
|
||||||
this.UseCurrentRomButton.Size = new System.Drawing.Size(62, 23);
|
this.UseCurrentRomButton.Size = new System.Drawing.Size(58, 23);
|
||||||
this.UseCurrentRomButton.TabIndex = 3;
|
this.UseCurrentRomButton.TabIndex = 3;
|
||||||
this.UseCurrentRomButton.Text = "Current";
|
this.UseCurrentRomButton.Text = "Current";
|
||||||
this.UseCurrentRomButton.UseVisualStyleBackColor = true;
|
this.UseCurrentRomButton.UseVisualStyleBackColor = true;
|
||||||
|
@ -70,12 +70,13 @@
|
||||||
//
|
//
|
||||||
// MultiDiskFileSelector
|
// MultiDiskFileSelector
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.Controls.Add(this.UseCurrentRomButton);
|
this.Controls.Add(this.UseCurrentRomButton);
|
||||||
this.Controls.Add(this.button1);
|
this.Controls.Add(this.BrowseButton);
|
||||||
this.Controls.Add(this.PathBox);
|
this.Controls.Add(this.PathBox);
|
||||||
this.Name = "MultiDiskFileSelector";
|
this.Name = "MultiDiskFileSelector";
|
||||||
this.Size = new System.Drawing.Size(425, 29);
|
this.Size = new System.Drawing.Size(422, 23);
|
||||||
this.Load += new System.EventHandler(this.DualGBFileSelector_Load);
|
this.Load += new System.EventHandler(this.DualGBFileSelector_Load);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
@ -84,7 +85,7 @@
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.Button button1;
|
private System.Windows.Forms.Button BrowseButton;
|
||||||
private System.Windows.Forms.TextBox PathBox;
|
private System.Windows.Forms.TextBox PathBox;
|
||||||
private System.Windows.Forms.Button UseCurrentRomButton;
|
private System.Windows.Forms.Button UseCurrentRomButton;
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Data;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using BizHawk.Client.Common;
|
using BizHawk.Client.Common;
|
||||||
using BizHawk.Emulation.Common;
|
|
||||||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
|
||||||
using BizHawk.Client.EmuHawk.WinFormExtensions;
|
using BizHawk.Client.EmuHawk.WinFormExtensions;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
@ -48,7 +40,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textBox1_DragEnter(object sender, DragEventArgs e)
|
private void PathBox_DragEnter(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Data.GetDataPresent(DataFormats.FileDrop) &&
|
if (e.Data.GetDataPresent(DataFormats.FileDrop) &&
|
||||||
((string[])e.Data.GetData(DataFormats.FileDrop)).Length == 1)
|
((string[])e.Data.GetData(DataFormats.FileDrop)).Length == 1)
|
||||||
|
@ -61,7 +53,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textBox1_DragDrop(object sender, DragEventArgs e)
|
private void PathBox_DragDrop(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||||
{
|
{
|
||||||
|
@ -73,7 +65,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void BrowseButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
using (var ofd = new OpenFileDialog
|
using (var ofd = new OpenFileDialog
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue