|
@@ -1526,7 +1526,7 @@ namespace Terminal.Gui {
|
|
|
|
|
|
if (!ustring.IsNullOrEmpty (TextFormatter.Text)) {
|
|
|
Rect containerBounds = GetContainerBounds ();
|
|
|
- Clear (ViewToScreen (GetNeedDisplay (containerBounds)));
|
|
|
+ Clear (GetNeedDisplay (containerBounds));
|
|
|
SetChildNeedsDisplay ();
|
|
|
// Draw any Text
|
|
|
if (TextFormatter != null) {
|
|
@@ -1572,7 +1572,7 @@ namespace Terminal.Gui {
|
|
|
|
|
|
Rect GetNeedDisplay (Rect containerBounds)
|
|
|
{
|
|
|
- Rect rect = NeedDisplay;
|
|
|
+ Rect rect = ViewToScreen (NeedDisplay);
|
|
|
if (!containerBounds.IsEmpty) {
|
|
|
rect.Width = Math.Min (NeedDisplay.Width, containerBounds.Width);
|
|
|
rect.Height = Math.Min (NeedDisplay.Height, containerBounds.Height);
|
|
@@ -2213,8 +2213,7 @@ namespace Terminal.Gui {
|
|
|
newLocation = pos.Anchor (superviewDimension - newDimension);
|
|
|
break;
|
|
|
|
|
|
- case Pos.PosCombine:
|
|
|
- var combine = pos as Pos.PosCombine;
|
|
|
+ case Pos.PosCombine combine:
|
|
|
int left, right;
|
|
|
(left, newDimension) = GetNewLocationAndDimension (superviewLocation, superviewDimension, combine.left, dim, autosizeDimension);
|
|
|
(right, newDimension) = GetNewLocationAndDimension (superviewLocation, superviewDimension, combine.right, dim, autosizeDimension);
|
|
@@ -2241,7 +2240,7 @@ namespace Terminal.Gui {
|
|
|
|
|
|
// Recursively calculates the new dimension (width or height) of the given Dim given:
|
|
|
// the current location (x or y)
|
|
|
- // the current dimennsion (width or height)
|
|
|
+ // the current dimension (width or height)
|
|
|
int CalculateNewDimension (Dim d, int location, int dimension, int autosize)
|
|
|
{
|
|
|
int newDimension;
|
|
@@ -2276,11 +2275,11 @@ namespace Terminal.Gui {
|
|
|
}
|
|
|
|
|
|
|
|
|
- // horiztonal
|
|
|
- (newX, newW) = GetNewLocationAndDimension (superviewFrame.X, superviewFrame.Width, x, Width, autosize.Width);
|
|
|
+ // horizontal
|
|
|
+ (newX, newW) = GetNewLocationAndDimension (superviewFrame.X, superviewFrame.Width, x, width, autosize.Width);
|
|
|
|
|
|
// vertical
|
|
|
- (newY, newH) = GetNewLocationAndDimension (superviewFrame.Y, superviewFrame.Height, y, Height, autosize.Height);
|
|
|
+ (newY, newH) = GetNewLocationAndDimension (superviewFrame.Y, superviewFrame.Height, y, height, autosize.Height);
|
|
|
|
|
|
var r = new Rect (newX, newY, newW, newH);
|
|
|
if (Frame != r) {
|