From d0672ce8e3c95caf61bfdc7eabf6c184fbb9200d Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Tue, 16 Nov 2021 18:00:24 -0500 Subject: make reset button a button control removes checkbox behavior / color change on toggle --- grapher/Form1.Designer.cs | 4 ++-- grapher/Models/AccelGUI.cs | 7 +++---- grapher/Models/AccelGUIFactory.cs | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index 89eafda..0779d23 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -163,7 +163,7 @@ namespace grapher this.DomainBoxY = new System.Windows.Forms.TextBox(); this.DomainBoxX = new System.Windows.Forms.TextBox(); this.DirectionalityLabel = new System.Windows.Forms.Label(); - this.toggleButton = new System.Windows.Forms.CheckBox(); + this.toggleButton = new System.Windows.Forms.Button(); this.scaleLabelY = new System.Windows.Forms.Label(); this.ScaleActiveYLabel = new System.Windows.Forms.Label(); this.scaleBoxY = new System.Windows.Forms.TextBox(); @@ -2357,7 +2357,7 @@ namespace grapher #endregion private System.Windows.Forms.Panel optionsPanel; - private System.Windows.Forms.CheckBox toggleButton; + private System.Windows.Forms.Button toggleButton; private System.Windows.Forms.Label scaleLabelY; private System.Windows.Forms.Label ScaleActiveYLabel; private System.Windows.Forms.TextBox scaleBoxY; diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 23d5017..831d1df 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -23,7 +23,7 @@ namespace grapher SettingsManager settings, ApplyOptions applyOptions, Button writeButton, - ButtonBase resetButton, + Button resetButton, MouseWatcher mouseWatcher, ToolStripMenuItem scaleMenuItem, ToolStripMenuItem deviceMenuItem) @@ -33,7 +33,7 @@ namespace grapher AccelCharts = accelCharts; ApplyOptions = applyOptions; WriteButton = writeButton; - ResetButton = (CheckBox)resetButton; + ResetButton = resetButton; ScaleMenuItem = scaleMenuItem; DeviceMenuItem = deviceMenuItem; Settings = settings; @@ -79,7 +79,7 @@ namespace grapher public Button WriteButton { get; } - public CheckBox ResetButton { get; } + public Button ResetButton { get; } public Timer ButtonTimer { get; } @@ -204,7 +204,6 @@ namespace grapher { WriteButton.Top = Constants.SensitivityChartAloneHeight - Constants.ButtonVerticalOffset; - ResetButton.Appearance = Appearance.Button; ResetButton.FlatStyle = FlatStyle.System; ResetButton.TextAlign = ContentAlignment.MiddleCenter; ResetButton.Size = WriteButton.Size; diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index 5fc7b8b..40c582a 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -33,7 +33,7 @@ namespace grapher.Models ComboBox capTypeDropdownXPower, ComboBox capTypeDropdownYPower, Button writeButton, - ButtonBase toggleButton, + Button toggleButton, ToolStripMenuItem showVelocityGainToolStripMenuItem, ToolStripMenuItem showLastMouseMoveMenuItem, ToolStripMenuItem streamingModeToolStripMenuItem, -- cgit v1.2.3