diff options
| author | Jacob Palecki <[email protected]> | 2021-01-12 09:25:48 -0800 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2021-01-12 09:25:48 -0800 |
| commit | 784f7cab713640f4a13880ebc3c5abc10894d23c (patch) | |
| tree | 5504f514c18e6c41c690996eb53974d2efd3fcf4 /grapher/Models | |
| parent | Directionality menu progress (diff) | |
| download | rawaccel-784f7cab713640f4a13880ebc3c5abc10894d23c.tar.xz rawaccel-784f7cab713640f4a13880ebc3c5abc10894d23c.zip | |
Many small tweaks
Diffstat (limited to 'grapher/Models')
| -rw-r--r-- | grapher/Models/AccelGUI.cs | 2 | ||||
| -rw-r--r-- | grapher/Models/AccelGUIFactory.cs | 3 | ||||
| -rw-r--r-- | grapher/Models/Charts/AccelCharts.cs | 8 | ||||
| -rw-r--r-- | grapher/Models/Charts/ChartState/ChartState.cs | 2 | ||||
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 1 | ||||
| -rw-r--r-- | grapher/Models/Options/ActiveValueLabelXY.cs | 12 | ||||
| -rw-r--r-- | grapher/Models/Options/Directionality/DirectionalityOptions.cs | 23 | ||||
| -rw-r--r-- | grapher/Models/Options/OptionXY.cs | 2 |
8 files changed, 39 insertions, 14 deletions
diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 045cb23..e125310 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -192,7 +192,7 @@ namespace grapher private void SetupButtons() { - WriteButton.Top = AccelCharts.Top + AccelCharts.TopChartHeight - Constants.ButtonVerticalOffset; + WriteButton.Top = Constants.SensitivityChartAloneHeight - Constants.ButtonVerticalOffset; ToggleButton.Appearance = Appearance.Button; ToggleButton.FlatStyle = FlatStyle.System; diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index e8def16..de01468 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -376,7 +376,8 @@ namespace grapher.Models domain, range, wholeCheckBox, - byComponentCheckBox); + byComponentCheckBox, + 245); var applyOptions = new ApplyOptions( byComponentXYLock, diff --git a/grapher/Models/Charts/AccelCharts.cs b/grapher/Models/Charts/AccelCharts.cs index b7abb35..ea1345f 100644 --- a/grapher/Models/Charts/AccelCharts.cs +++ b/grapher/Models/Charts/AccelCharts.cs @@ -80,14 +80,6 @@ namespace grapher } } - public int TopChartHeight - { - get - { - return ChartState.SensitivityChart.Height; - } - } - private int FormBorderHeight { get; } private ChartState ChartState { get; set; } diff --git a/grapher/Models/Charts/ChartState/ChartState.cs b/grapher/Models/Charts/ChartState/ChartState.cs index 0bb141e..269d269 100644 --- a/grapher/Models/Charts/ChartState/ChartState.cs +++ b/grapher/Models/Charts/ChartState/ChartState.cs @@ -77,12 +77,14 @@ namespace grapher.Models.Charts.ChartState public void ShowVelocityAndGain() { + SensitivityChart.SetHeight(Constants.SensitivityChartTogetherHeight); VelocityChart.Show(); GainChart.Show(); } public void HideVelocityAndGain() { + SensitivityChart.SetHeight(Constants.SensitivityChartAloneHeight); VelocityChart.Hide(); GainChart.Hide(); } diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index 4410a12..8d3fecb 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -289,7 +289,6 @@ namespace grapher Limit, Exponent, Midpoint, - WriteButton, top); } diff --git a/grapher/Models/Options/ActiveValueLabelXY.cs b/grapher/Models/Options/ActiveValueLabelXY.cs index 381779c..f5b593e 100644 --- a/grapher/Models/Options/ActiveValueLabelXY.cs +++ b/grapher/Models/Options/ActiveValueLabelXY.cs @@ -140,6 +140,18 @@ namespace grapher.Models.Options } } + public void Hide() + { + X.Hide(); + Y.Hide(); + } + + public void Show() + { + X.Show(); + Y.Show(); + } + private void Align (int width) { FullWidth = width; diff --git a/grapher/Models/Options/Directionality/DirectionalityOptions.cs b/grapher/Models/Options/Directionality/DirectionalityOptions.cs index c83ea52..9485877 100644 --- a/grapher/Models/Options/Directionality/DirectionalityOptions.cs +++ b/grapher/Models/Options/Directionality/DirectionalityOptions.cs @@ -20,7 +20,8 @@ namespace grapher.Models.Options.Directionality OptionXY domain, OptionXY range, CheckBox wholeCheckBox, - CheckBox byComponentCheckBox) + CheckBox byComponentCheckBox, + int top) { ContainingPanel = containingPanel; DirectionalityLabel = directionalityLabel; @@ -33,8 +34,18 @@ namespace grapher.Models.Options.Directionality WholeCheckBox = wholeCheckBox; ByComponentCheckBox = byComponentCheckBox; + Domain.Fields.LockCheckBox.Checked = false; + Range.Fields.LockCheckBox.Checked = false; + Domain.Fields.LockCheckBox.Enabled = false; + Range.Fields.LockCheckBox.Enabled = false; + Domain.Fields.LockCheckBox.Hide(); + Range.Fields.LockCheckBox.Hide(); + Domain.Fields.SetSeparate(); + Range.Fields.SetSeparate(); + ContainingPanel.Paint += panel_Paint; DirectionalityLabel.Click += title_click; + ContainingPanel.Top = top; DirectionalityLabel.Left = Constants.DirectionalityTitlePad; DirectionalityLabel.Top = Constants.DirectionalityTitlePad; IsHidden = false; @@ -62,6 +73,10 @@ namespace grapher.Models.Options.Directionality public CheckBox ByComponentCheckBox { get; } + public int OpenHeight { get => WholeCheckBox.Bottom - DirectionalityLabel.Top + 2 * Constants.DirectionalityTitlePad; } + + public int ClosedHeight { get => DirectionalityLabel.Height + 2 * Constants.DirectionalityTitlePad; } + private bool IsHidden { get; set; } public DomainArgs GetDomainArgs() @@ -149,6 +164,8 @@ namespace grapher.Models.Options.Directionality LpNorm.Show(); Domain.Show(); Range.Show(); + Domain.Fields.LockCheckBox.Hide(); + Range.Fields.LockCheckBox.Hide(); WholeCheckBox.Show(); ByComponentCheckBox.Show(); DirectionalityLabel.Text = Constants.DirectionalityTitleOpen; @@ -173,13 +190,13 @@ namespace grapher.Models.Options.Directionality private void DrawHidden() { - ContainingPanel.Height = DirectionalityLabel.Height + 2 * Constants.DirectionalityTitlePad; + ContainingPanel.Height = ClosedHeight; ContainingPanel.Invalidate(); } private void DrawShown() { - ContainingPanel.Height = WholeCheckBox.Bottom - DirectionalityLabel.Top + 2 * Constants.DirectionalityTitlePad; + ContainingPanel.Height = OpenHeight; ContainingPanel.Invalidate(); } diff --git a/grapher/Models/Options/OptionXY.cs b/grapher/Models/Options/OptionXY.cs index 3557a06..911d26b 100644 --- a/grapher/Models/Options/OptionXY.cs +++ b/grapher/Models/Options/OptionXY.cs @@ -137,6 +137,7 @@ namespace grapher Fields.Hide(); Fields.LockCheckBox.Hide(); Label.Hide(); + ActiveValueLabels.Hide(); } public void Show() @@ -144,6 +145,7 @@ namespace grapher Fields.Show(); Fields.LockCheckBox.Show(); Label.Show(); + ActiveValueLabels.Show(); } public override void Show(string name) |