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)
|
||||
{
|
||||
int start = 5 + (FileSelectorPanel.Controls.Count * 43);
|
||||
int start = 3 + (FileSelectorPanel.Controls.Count * 43);
|
||||
|
||||
var groupBox = new GroupBox
|
||||
{
|
||||
Text = "",
|
||||
Location = new Point(5, start),
|
||||
Size = new Size(435, 38),
|
||||
Location = UIHelper.Scale(new Point(6, start)),
|
||||
Size = new Size(FileSelectorPanel.ClientSize.Width - UIHelper.ScaleX(12), UIHelper.ScaleY(41)),
|
||||
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
mdf.NameChanged += FileSelector_NameChanged;
|
||||
|
||||
groupBox.Controls.Add(mdf);
|
||||
//grpMulti.Controls.Add(mdf);
|
||||
|
||||
FileSelectorPanel.Controls.Add(groupBox);
|
||||
}
|
||||
|
|
|
@ -28,41 +28,41 @@
|
|||
/// </summary>
|
||||
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.UseCurrentRomButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
// BrowseButton
|
||||
//
|
||||
this.button1.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.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(60, 23);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Browse...";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
this.BrowseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BrowseButton.Location = new System.Drawing.Point(294, 0);
|
||||
this.BrowseButton.Name = "BrowseButton";
|
||||
this.BrowseButton.Size = new System.Drawing.Size(66, 23);
|
||||
this.BrowseButton.TabIndex = 2;
|
||||
this.BrowseButton.Text = "Browse...";
|
||||
this.BrowseButton.UseVisualStyleBackColor = true;
|
||||
this.BrowseButton.Click += new System.EventHandler(this.BrowseButton_Click);
|
||||
//
|
||||
// PathBox
|
||||
//
|
||||
this.PathBox.AllowDrop = true;
|
||||
this.PathBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| 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.Size = new System.Drawing.Size(285, 20);
|
||||
this.PathBox.Size = new System.Drawing.Size(288, 20);
|
||||
this.PathBox.TabIndex = 1;
|
||||
this.PathBox.TextChanged += new System.EventHandler(this.PathBox_TextChanged);
|
||||
this.PathBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.textBox1_DragDrop);
|
||||
this.PathBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.textBox1_DragEnter);
|
||||
this.PathBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.PathBox_DragDrop);
|
||||
this.PathBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.PathBox_DragEnter);
|
||||
//
|
||||
// UseCurrentRomButton
|
||||
//
|
||||
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.Size = new System.Drawing.Size(62, 23);
|
||||
this.UseCurrentRomButton.Size = new System.Drawing.Size(58, 23);
|
||||
this.UseCurrentRomButton.TabIndex = 3;
|
||||
this.UseCurrentRomButton.Text = "Current";
|
||||
this.UseCurrentRomButton.UseVisualStyleBackColor = true;
|
||||
|
@ -70,12 +70,13 @@
|
|||
//
|
||||
// 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.button1);
|
||||
this.Controls.Add(this.BrowseButton);
|
||||
this.Controls.Add(this.PathBox);
|
||||
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.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
@ -84,7 +85,7 @@
|
|||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button BrowseButton;
|
||||
private System.Windows.Forms.TextBox PathBox;
|
||||
private System.Windows.Forms.Button UseCurrentRomButton;
|
||||
|
||||
|
|
|
@ -1,15 +1,7 @@
|
|||
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 BizHawk.Client.Common;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||
using BizHawk.Client.EmuHawk.WinFormExtensions;
|
||||
|
||||
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) &&
|
||||
((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))
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue