diff options
| author | Jacob Palecki <[email protected]> | 2020-09-08 01:09:19 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-08 01:09:19 -0700 |
| commit | 254a66eda9d9f6add21937b3570d29f64af4ab1e (patch) | |
| tree | 5d5a7995ae14d9aba924024a1694c5d1760634c6 | |
| parent | Alignment for whole mode works (diff) | |
| download | rawaccel-254a66eda9d9f6add21937b3570d29f64af4ab1e.tar.xz rawaccel-254a66eda9d9f6add21937b3570d29f64af4ab1e.zip | |
Fix few small bugs
| -rw-r--r-- | grapher/Models/Fields/FieldXY.cs | 10 | ||||
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 1 | ||||
| -rw-r--r-- | grapher/Models/Options/ActiveValueLabelXY.cs | 25 | ||||
| -rw-r--r-- | grapher/Models/Options/ApplyOptions.cs | 5 | ||||
| -rw-r--r-- | grapher/Models/Options/OptionXY.cs | 1 |
5 files changed, 35 insertions, 7 deletions
diff --git a/grapher/Models/Fields/FieldXY.cs b/grapher/Models/Fields/FieldXY.cs index 826be27..b1db220 100644 --- a/grapher/Models/Fields/FieldXY.cs +++ b/grapher/Models/Fields/FieldXY.cs @@ -61,13 +61,21 @@ namespace grapher public Field YField { get; } + public int CombinedWidth { get; } + + public int Left { + get + { + return XField.Left; + } + } + private bool Combined { get; set; } private int DefaultWidthX { get; } private int DefaultWidthY { get; } - private int CombinedWidth { get; } #endregion Properties diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index 6a5dbc8..02d54d1 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -155,6 +155,7 @@ namespace grapher public override void Hide() { AccelDropdown.Hide(); + AccelTypeActiveValue.Hide(); Acceleration.Hide(); Cap.Hide(); diff --git a/grapher/Models/Options/ActiveValueLabelXY.cs b/grapher/Models/Options/ActiveValueLabelXY.cs index 3f94847..e6e4f52 100644 --- a/grapher/Models/Options/ActiveValueLabelXY.cs +++ b/grapher/Models/Options/ActiveValueLabelXY.cs @@ -22,10 +22,7 @@ namespace grapher.Models.Options X = x; Y = y; - FullWidth = x.Width; - ShortenedWidth = (FullWidth - Constants.ActiveLabelXYSeparation) / 2; - - Y.Left = X.Left + ShortenedWidth + Constants.ActiveLabelXYSeparation; + Align(x.Width); Y.Width = ShortenedWidth; Y.FormatString = Constants.ShortenedFormatString; @@ -43,6 +40,19 @@ namespace grapher.Models.Options public bool Combined { get; private set; } + public int Left + { + get + { + return X.Left; + } + set + { + X.Left = value; + SetYLeft(); + } + } + private int FullWidth { get; set; } private int ShortenedWidth { get; set; } @@ -112,10 +122,15 @@ namespace grapher.Models.Options FullWidth = width; ShortenedWidth = (FullWidth - Constants.ActiveLabelXYSeparation) / 2; - Y.Left = X.Left + ShortenedWidth + Constants.ActiveLabelXYSeparation; + SetYLeft(); Y.Width = ShortenedWidth; } + private void SetYLeft() + { + Y.Left = X.Left + ShortenedWidth + Constants.ActiveLabelXYSeparation; + } + #endregion Methods } } diff --git a/grapher/Models/Options/ApplyOptions.cs b/grapher/Models/Options/ApplyOptions.cs index 76a3bb8..5e4aef4 100644 --- a/grapher/Models/Options/ApplyOptions.cs +++ b/grapher/Models/Options/ApplyOptions.cs @@ -163,7 +163,10 @@ namespace grapher.Models.Options public void OnByComponentCheckedChange(object sender, EventArgs e) { - EnableByComponentApplication(); + if (ByComponentVectorMenuItem.Checked) + { + EnableByComponentApplication(); + } } public void ShowWholeSet() diff --git a/grapher/Models/Options/OptionXY.cs b/grapher/Models/Options/OptionXY.cs index 372bbe9..9741702 100644 --- a/grapher/Models/Options/OptionXY.cs +++ b/grapher/Models/Options/OptionXY.cs @@ -16,6 +16,7 @@ namespace grapher Fields = fields; Label = label; ActiveValueLabels = activeValueLabels; + ActiveValueLabels.Left = fields.CombinedWidth + fields.Left; } public OptionXY( |