Skip to content

Commit

Permalink
fixed issue where controls weren't sizing correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePohatu committed Aug 21, 2016
1 parent c089af1 commit 23c55a4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
12 changes: 8 additions & 4 deletions TsGui/GuiOptions/TsBaseOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,22 @@ protected void HideUnhide(bool Hidden)
this._ishidden = Hidden;
if (Hidden == true)
{
Thickness zerothick = new Thickness(0);
this._control.Visibility = Visibility.Collapsed;
this._labelcontrol.Visibility = Visibility.Collapsed;
this.Height = 0;
this.Margin = new Thickness(0);
this.LabelMargin = new Thickness(0);
//this.Height = 0;
this.Margin = zerothick;
this.LabelMargin = zerothick;
this.Padding = zerothick;
this.LabelPadding = zerothick;
}
else
{
this._control.Visibility = Visibility.Visible;
this._labelcontrol.Visibility = Visibility.Visible;
this.Height = this._visibleHeight;
//this.Height = this._visibleHeight;
this.Padding = this._visiblepadding;
this.LabelPadding = this._visiblelabelpadding;
this.Margin = this._visiblemargin;
this.LabelMargin = this._visiblelabelmargin;
}
Expand Down
1 change: 1 addition & 0 deletions TsGui/GuiOptions/TsCheckBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public TsCheckBox(XElement SourceXml, MainController RootController) : base()
this._control.SetBinding(Label.IsEnabledProperty, new Binding("IsEnabled"));
this._control.SetBinding(Label.PaddingProperty, new Binding("Padding"));
this._control.SetBinding(Label.MarginProperty, new Binding("Margin"));
this._control.SetBinding(TextBox.HeightProperty, new Binding("Height"));

this._visiblepadding = new Thickness(0,0,0,0);
this.Padding = this._visiblepadding;
Expand Down
3 changes: 2 additions & 1 deletion TsGui/GuiOptions/TsDropDownList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ public TsDropDownList(XElement SourceXml, MainController RootController) : base(
this._control.SetBinding(ComboBox.IsEnabledProperty, new Binding("IsEnabled"));
this._control.SetBinding(ComboBox.PaddingProperty, new Binding("Padding"));
this._control.SetBinding(ComboBox.MarginProperty, new Binding("Margin"));
this._control.SetBinding(ComboBox.HeightProperty, new Binding("Height"));

this._control.VerticalAlignment = VerticalAlignment.Center;
this._control.VerticalAlignment = VerticalAlignment.Bottom;
this._visiblepadding = new Thickness(6, 2, 2, 3);
this.Padding = this._visiblepadding;

Expand Down
1 change: 1 addition & 0 deletions TsGui/PageLayout/TsColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public void Build()
//option.Label.Margin = this._margin;

RowDefinition coldefRow = new RowDefinition();
coldefRow.Height = GridLength.Auto;
//coldefRow.Height = new GridLength(option.Height + option.Margin.Top + option.Margin.Bottom) ;
this._columngrid.RowDefinitions.Add(coldefRow);

Expand Down

0 comments on commit 23c55a4

Please sign in to comment.