fix terrible looking checkbox that was added to firmwaresconfig toolbar by hand instead of the IDE. actually it's kind of cool that you can jam any kind of controls in there, it gives me hope that you could make better looking toolbars by virtue of their not being styled like the ugly toolbars. but it really needs to be all-or-nothing.

This commit is contained in:
zeromus 2021-06-30 04:44:09 -04:00
parent 0ae2dc774c
commit 858faaeb56
3 changed files with 45 additions and 26 deletions

View File

@ -31,6 +31,7 @@ namespace BizHawk.Client.EmuHawk
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FirmwaresConfig));
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.lvFirmwares = new System.Windows.Forms.ListView();
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -47,7 +48,7 @@ namespace BizHawk.Client.EmuHawk
this.tsmiInfo = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.tsmiCopy = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.panel1 = new System.Windows.Forms.Panel();
this.toolStrip1 = new ToolStripEx();
this.toolStrip1 = new BizHawk.WinForms.Controls.ToolStripEx();
this.tbbGroup = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
this.tbbScan = new System.Windows.Forms.ToolStripButton();
@ -57,6 +58,7 @@ namespace BizHawk.Client.EmuHawk
this.toolStripSeparator1 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
this.tbbCloseReload = new System.Windows.Forms.ToolStripButton();
this.tbbOpenFolder = new System.Windows.Forms.ToolStripButton();
this._cbAllowImport = new System.Windows.Forms.ToolStripButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.panel2 = new System.Windows.Forms.Panel();
this.linkBasePath = new System.Windows.Forms.Label();
@ -92,6 +94,7 @@ namespace BizHawk.Client.EmuHawk
this.lvFirmwares.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvFirmwares.FullRowSelect = true;
this.lvFirmwares.GridLines = true;
this.lvFirmwares.HideSelection = false;
this.lvFirmwares.Location = new System.Drawing.Point(0, 25);
this.lvFirmwares.Name = "lvFirmwares";
this.lvFirmwares.ShowItemToolTips = true;
@ -151,7 +154,7 @@ namespace BizHawk.Client.EmuHawk
this.tsmiInfo,
this.tsmiCopy});
this.lvFirmwaresContextMenuStrip.Name = "lvFirmwaresContextMenuStrip";
this.lvFirmwaresContextMenuStrip.Size = new System.Drawing.Size(182, 92);
this.lvFirmwaresContextMenuStrip.Size = new System.Drawing.Size(170, 92);
this.lvFirmwaresContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.LvFirmwaresContextMenuStrip_Opening);
//
// tsmiSetCustomization
@ -195,7 +198,8 @@ namespace BizHawk.Client.EmuHawk
this.tbbClose,
this.toolStripSeparator1,
this.tbbCloseReload,
this.tbbOpenFolder});
this.tbbOpenFolder,
this._cbAllowImport});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.TabIndex = 23;
@ -208,7 +212,7 @@ namespace BizHawk.Client.EmuHawk
this.tbbGroup.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tbbGroup.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbbGroup.Name = "tbbGroup";
this.tbbGroup.Size = new System.Drawing.Size(44, 22);
this.tbbGroup.Size = new System.Drawing.Size(40, 22);
this.tbbGroup.Text = "Group";
this.tbbGroup.Click += new System.EventHandler(this.TbbGroup_Click);
//
@ -217,7 +221,7 @@ namespace BizHawk.Client.EmuHawk
this.tbbScan.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tbbScan.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbbScan.Name = "tbbScan";
this.tbbScan.Size = new System.Drawing.Size(36, 22);
this.tbbScan.Size = new System.Drawing.Size(34, 22);
this.tbbScan.Text = "Scan";
this.tbbScan.Click += new System.EventHandler(this.TbbScan_Click);
//
@ -226,7 +230,7 @@ namespace BizHawk.Client.EmuHawk
this.tbbOrganize.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tbbOrganize.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbbOrganize.Name = "tbbOrganize";
this.tbbOrganize.Size = new System.Drawing.Size(58, 22);
this.tbbOrganize.Size = new System.Drawing.Size(54, 22);
this.tbbOrganize.Text = "Organize";
this.tbbOrganize.Click += new System.EventHandler(this.TbbOrganize_Click);
//
@ -235,7 +239,7 @@ namespace BizHawk.Client.EmuHawk
this.tbbImport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tbbImport.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbbImport.Name = "tbbImport";
this.tbbImport.Size = new System.Drawing.Size(47, 22);
this.tbbImport.Size = new System.Drawing.Size(43, 22);
this.tbbImport.Text = "Import";
this.tbbImport.Click += new System.EventHandler(this.TbbImport_Click);
//
@ -246,9 +250,12 @@ namespace BizHawk.Client.EmuHawk
this.tbbClose.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbbClose.Margin = new System.Windows.Forms.Padding(0, 1, 2, 2);
this.tbbClose.Name = "tbbClose";
this.tbbClose.Size = new System.Drawing.Size(40, 22);
this.tbbClose.Size = new System.Drawing.Size(37, 22);
this.tbbClose.Text = "Close";
this.tbbClose.Click += new System.EventHandler(this.TbbClose_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolStripSeparator1.Visible = false;
//
@ -259,7 +266,7 @@ namespace BizHawk.Client.EmuHawk
this.tbbCloseReload.Enabled = false;
this.tbbCloseReload.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbbCloseReload.Name = "tbbCloseReload";
this.tbbCloseReload.Size = new System.Drawing.Size(129, 22);
this.tbbCloseReload.Size = new System.Drawing.Size(117, 22);
this.tbbCloseReload.Text = "Close and reload ROM";
this.tbbCloseReload.ToolTipText = "Close and reload ROM";
this.tbbCloseReload.Visible = false;
@ -270,10 +277,20 @@ namespace BizHawk.Client.EmuHawk
this.tbbOpenFolder.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tbbOpenFolder.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbbOpenFolder.Name = "tbbOpenFolder";
this.tbbOpenFolder.Size = new System.Drawing.Size(128, 22);
this.tbbOpenFolder.Size = new System.Drawing.Size(117, 22);
this.tbbOpenFolder.Text = "Open Firmware Folder";
this.tbbOpenFolder.Click += new System.EventHandler(this.TbbOpenFolder_Click);
//
// _cbAllowImport
//
this._cbAllowImport.CheckOnClick = true;
this._cbAllowImport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this._cbAllowImport.Image = ((System.Drawing.Image)(resources.GetObject("_cbAllowImport.Image")));
this._cbAllowImport.ImageTransparentColor = System.Drawing.Color.Magenta;
this._cbAllowImport.Name = "_cbAllowImport";
this._cbAllowImport.Size = new System.Drawing.Size(169, 22);
this._cbAllowImport.Text = "Allow Importing of Unknown Files";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
@ -386,5 +403,6 @@ namespace BizHawk.Client.EmuHawk
private BizHawk.WinForms.Controls.ToolStripSeparatorEx toolStripSeparator1;
private BizHawk.WinForms.Controls.LocLabelEx label2;
private System.Windows.Forms.ToolStripButton tbbOpenFolder;
}
private System.Windows.Forms.ToolStripButton _cbAllowImport;
}
}

View File

@ -73,8 +73,6 @@ namespace BizHawk.Client.EmuHawk
public string TargetSystem { get; set; }
private CheckBox _cbAllowImport;
private const int IdUnsure = 0;
private const int IdMissing = 1;
private const int IdOk = 2;
@ -221,19 +219,6 @@ namespace BizHawk.Client.EmuHawk
var oldBasePath = _currSelectorDir;
linkBasePath.Text = _currSelectorDir = _pathEntries.FirmwareAbsolutePath();
if (_currSelectorDir != oldBasePath) DoScan();
_cbAllowImport = new CheckBox
{
Text = "Allow Importing of Unknown Files",
BackColor = SystemColors.Control,
CheckAlign = ContentAlignment.MiddleLeft,
TextAlign = ContentAlignment.MiddleLeft,
Font = new Font("Segeo UI", 9, FontStyle.Regular, GraphicsUnit.Point, 1, false),
Checked = false,
Size = new Size(230, 22),
};
ToolStripControlHost host = new ToolStripControlHost(_cbAllowImport);
toolStrip1.Items.Add(host);
}
private void TbbClose_Click(object sender, EventArgs e)

View File

@ -126,6 +126,22 @@
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>122, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="_cbAllowImport.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>221, 17</value>
</metadata>