Patch for position of the StatusBar

This commit is contained in:
BDisp
2020-03-30 03:31:13 +01:00
parent 72d54f4922
commit 82d38e585a
2 changed files with 6 additions and 3 deletions

View File

@@ -1475,7 +1475,6 @@ namespace Terminal.Gui {
ny = ny + top.Frame.Height > l ? Math.Max(l - top.Frame.Height, m ? 1 : 0) : ny;
}
//Dictionary<View, Rect> subViews;
internal void PositionToplevels ()
{
if (this != Application.Top) {
@@ -1492,6 +1491,10 @@ namespace Terminal.Gui {
top.X = nx;
top.Y = ny;
}
if (HasStatusBar && ny + top.Frame.Height > Driver.Rows - 1) {
if (top.Height is Dim.DimFill)
top.Height = Dim.Fill () - 1;
}
}
}
}

View File

@@ -346,7 +346,7 @@ namespace Terminal.Gui {
return new DimFactor (n / 100);
}
class DimAbsolute : Dim {
internal class DimAbsolute : Dim {
int n;
public DimAbsolute (int n) { this.n = n; }
@@ -366,7 +366,7 @@ namespace Terminal.Gui {
}
class DimFill : Dim {
internal class DimFill : Dim {
int margin;
public DimFill (int margin) { this.margin = margin; }