Changing Dim.DimCombine class as public.

This commit is contained in:
BDisp
2020-10-20 21:11:11 +01:00
parent bb67b5ad07
commit be840f31cc
2 changed files with 2 additions and 4 deletions

View File

@@ -499,7 +499,7 @@ namespace Terminal.Gui {
return new DimAbsolute (n);
}
class DimCombine : Dim {
public class DimCombine : Dim {
Dim left, right;
bool add;
public DimCombine (bool add, Dim left, Dim right)

View File

@@ -145,9 +145,7 @@ namespace Terminal.Gui {
base.Text = ustring.Make (_leftBracket) + " " + text + " " + ustring.Make (_rightBracket);
int w = base.Text.RuneCount - (base.Text.Contains (HotKeySpecifier) ? 1 : 0);
try {
Width = w;
} catch (Exception) {
if (Width is Dim.DimCombine) {
// It's a Dim.DimCombine and so can't be assigned. Let it have it's own anchor.
w = Width.Anchor (w);
}