Browse Source

Merge pull request #967 from BDisp/button-dim-combine-fix

Fixes #965. Broken buttons
Charlie Kindel 4 years ago
parent
commit
c8765e4960
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Terminal.Gui/Views/Button.cs

+ 2 - 0
Terminal.Gui/Views/Button.cs

@@ -148,6 +148,8 @@ namespace Terminal.Gui {
 			if (Width is Dim.DimCombine) {
 			if (Width is Dim.DimCombine) {
 				// It's a Dim.DimCombine and so can't be assigned. Let it have it's own anchor.
 				// It's a Dim.DimCombine and so can't be assigned. Let it have it's own anchor.
 				w = Width.Anchor (w);
 				w = Width.Anchor (w);
+			} else {
+				Width = w;
 			}
 			}
 			Height = 1;
 			Height = 1;
 			Frame = new Rect (Frame.Location, new Size (w, 1));
 			Frame = new Rect (Frame.Location, new Size (w, 1));