mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Revert "Fix a bug where a row is less than zero on shrinking."
This reverts commit f6e5c7be85.
This commit is contained in:
@@ -445,10 +445,12 @@ namespace Terminal.Gui {
|
||||
|
||||
private void Parent_Removed (View obj)
|
||||
{
|
||||
if (borderBrush != null) {
|
||||
if (borderBrush != null)
|
||||
{
|
||||
BorderBrush = default;
|
||||
}
|
||||
if (background != null) {
|
||||
if (background != null)
|
||||
{
|
||||
Background = default;
|
||||
}
|
||||
child.Removed -= Parent_Removed;
|
||||
@@ -798,7 +800,7 @@ namespace Terminal.Gui {
|
||||
SetBorderBrush (driver);
|
||||
|
||||
// Draw the upper BorderThickness
|
||||
for (int r = Math.Max (frame.Y, 0);
|
||||
for (int r = frame.Y;
|
||||
r < Math.Min (frame.Y + borderThickness.Top, frame.Bottom); r++) {
|
||||
for (int c = frame.X;
|
||||
c < Math.Min (frame.Right, driver.Cols); c++) {
|
||||
@@ -808,7 +810,7 @@ namespace Terminal.Gui {
|
||||
}
|
||||
|
||||
// Draw the left BorderThickness
|
||||
for (int r = Math.Max (Math.Min (frame.Y + borderThickness.Top, frame.Bottom), 0);
|
||||
for (int r = Math.Min (frame.Y + borderThickness.Top, frame.Bottom);
|
||||
r < Math.Min (frame.Bottom - borderThickness.Bottom, driver.Rows); r++) {
|
||||
for (int c = frame.X;
|
||||
c < Math.Min (frame.X + borderThickness.Left, frame.Right); c++) {
|
||||
@@ -818,7 +820,7 @@ namespace Terminal.Gui {
|
||||
}
|
||||
|
||||
// Draw the right BorderThickness
|
||||
for (int r = Math.Max (Math.Min (frame.Y + borderThickness.Top, frame.Bottom), 0);
|
||||
for (int r = Math.Min (frame.Y + borderThickness.Top, frame.Bottom);
|
||||
r < Math.Min (frame.Bottom - borderThickness.Bottom, driver.Rows); r++) {
|
||||
for (int c = Math.Max (frame.Right - borderThickness.Right, frame.X);
|
||||
c < Math.Min (frame.Right, driver.Cols); c++) {
|
||||
@@ -840,7 +842,7 @@ namespace Terminal.Gui {
|
||||
SetBackground (driver);
|
||||
|
||||
// Draw the upper Padding
|
||||
for (int r = Math.Max (frame.Y + borderThickness.Top, 0);
|
||||
for (int r = frame.Y + borderThickness.Top;
|
||||
r < Math.Min (frame.Y + sumThickness.Top, frame.Bottom - borderThickness.Bottom); r++) {
|
||||
for (int c = frame.X + borderThickness.Left;
|
||||
c < Math.Min (frame.Right - borderThickness.Right, driver.Cols); c++) {
|
||||
@@ -850,7 +852,7 @@ namespace Terminal.Gui {
|
||||
}
|
||||
|
||||
// Draw the left Padding
|
||||
for (int r = Math.Max (frame.Y + sumThickness.Top, 0);
|
||||
for (int r = frame.Y + sumThickness.Top;
|
||||
r < Math.Min (frame.Bottom - sumThickness.Bottom, driver.Rows); r++) {
|
||||
for (int c = frame.X + borderThickness.Left;
|
||||
c < Math.Min (frame.X + sumThickness.Left, frame.Right - borderThickness.Right); c++) {
|
||||
@@ -860,7 +862,7 @@ namespace Terminal.Gui {
|
||||
}
|
||||
|
||||
// Draw the right Padding
|
||||
for (int r = Math.Max (frame.Y + sumThickness.Top, 0);
|
||||
for (int r = frame.Y + sumThickness.Top;
|
||||
r < Math.Min (frame.Bottom - sumThickness.Bottom, driver.Rows); r++) {
|
||||
for (int c = Math.Max (frame.Right - sumThickness.Right, frame.X + sumThickness.Left);
|
||||
c < Math.Max (frame.Right - borderThickness.Right, frame.X + sumThickness.Left); c++) {
|
||||
|
||||
Reference in New Issue
Block a user