From 7a61b53fa12e4dec13b81f73b2687bbf10f41f09 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 22 Dec 2013 03:21:32 +0000 Subject: [PATCH] Toolbox - rip out text feature since the box is too small to see it now --- .../tools/ToolBox.Designer.cs | 6 ++-- BizHawk.Client.EmuHawk/tools/ToolBox.cs | 30 ++++--------------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/ToolBox.Designer.cs b/BizHawk.Client.EmuHawk/tools/ToolBox.Designer.cs index 0b11a0f2c3..a90449e54c 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolBox.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolBox.Designer.cs @@ -56,7 +56,7 @@ // this.CloseBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.CloseBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.CloseBtn.Location = new System.Drawing.Point(152, 135); + this.CloseBtn.Location = new System.Drawing.Point(152, 110); this.CloseBtn.Name = "CloseBtn"; this.CloseBtn.Size = new System.Drawing.Size(0, 23); this.CloseBtn.TabIndex = 1; @@ -98,7 +98,7 @@ this.ToolBoxStrip.Location = new System.Drawing.Point(2, 2); this.ToolBoxStrip.Name = "ToolBoxStrip"; this.ToolBoxStrip.Padding = new System.Windows.Forms.Padding(0); - this.ToolBoxStrip.Size = new System.Drawing.Size(137, 166); + this.ToolBoxStrip.Size = new System.Drawing.Size(137, 141); this.ToolBoxStrip.Stretch = true; this.ToolBoxStrip.TabIndex = 0; this.ToolBoxStrip.TabStop = true; @@ -280,7 +280,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.CloseBtn; - this.ClientSize = new System.Drawing.Size(140, 170); + this.ClientSize = new System.Drawing.Size(140, 145); this.Controls.Add(this.CloseBtn); this.Controls.Add(this.ToolBoxStrip); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); diff --git a/BizHawk.Client.EmuHawk/tools/ToolBox.cs b/BizHawk.Client.EmuHawk/tools/ToolBox.cs index e2fe3ef2a2..5cccf8e7da 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolBox.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolBox.cs @@ -28,7 +28,6 @@ namespace BizHawk.Client.EmuHawk SetTools(); ToolBoxItems.First().Select(); - SetText(); SetSize(); ToolBoxItems.First().Select(); @@ -68,15 +67,11 @@ namespace BizHawk.Client.EmuHawk foreach (var button in ToolBoxItems) { - var toolBtn = button as ToolStripButton; - toolBtn.Click += (o, e) => Close(); - toolBtn.Paint += (o, e) => - { - if (ToolBoxItems.Any(x => x.Selected)) - { - SetText(); - } - }; + if (button.Visible) + { + var toolBtn = button as ToolStripButton; + toolBtn.Click += (o, e) => Close(); + } } } @@ -86,19 +81,6 @@ namespace BizHawk.Client.EmuHawk this.Height = 30 + (rows * 30); } - private void SetText() - { - var items = ToolBoxItems.ToList(); - if (items.Any(x => x.Selected)) - { - Text = items.FirstOrDefault(x => x.Selected).ToolTipText; - } - else - { - Text = String.Empty; - } - } - /// /// Provide LINQ capabilities to an outdated form collection /// @@ -117,7 +99,7 @@ namespace BizHawk.Client.EmuHawk private void CloseBtn_Enter(object sender, EventArgs e) { - ToolBoxStrip.Focus(); + //ToolBoxStrip.Focus(); } #region Icon Clicks