Browse Source

Add ColorScheme to the contentBottomRightCorner and only set the visibility if necessary.

BDisp 2 years ago
parent
commit
2bcd22c49d
1 changed files with 7 additions and 7 deletions
  1. 7 7
      Terminal.Gui/Views/ScrollBarView.cs

+ 7 - 7
Terminal.Gui/Views/ScrollBarView.cs

@@ -109,7 +109,7 @@ namespace Terminal.Gui {
 				OtherScrollBarView.ShowScrollIndicator = true;
 				OtherScrollBarView.ShowScrollIndicator = true;
 			}
 			}
 			ShowScrollIndicator = true;
 			ShowScrollIndicator = true;
-			contentBottomRightCorner = new View (" ") { Visible = host.Visible };
+			contentBottomRightCorner = new View (" ") { Visible = host.Visible, ColorScheme = host.ColorScheme };
 			Host.SuperView.Add (contentBottomRightCorner);
 			Host.SuperView.Add (contentBottomRightCorner);
 			contentBottomRightCorner.X = Pos.Right (host) - 1;
 			contentBottomRightCorner.X = Pos.Right (host) - 1;
 			contentBottomRightCorner.Y = Pos.Bottom (host) - 1;
 			contentBottomRightCorner.Y = Pos.Bottom (host) - 1;
@@ -346,23 +346,23 @@ namespace Terminal.Gui {
 			}
 			}
 
 
 			if (showBothScrollIndicator) {
 			if (showBothScrollIndicator) {
-				if (contentBottomRightCorner != null) {
+				if (contentBottomRightCorner != null && !contentBottomRightCorner.Visible) {
 					contentBottomRightCorner.Visible = true;
 					contentBottomRightCorner.Visible = true;
-				} else if (otherScrollBarView != null && otherScrollBarView.contentBottomRightCorner != null) {
+				} else if (otherScrollBarView != null && otherScrollBarView.contentBottomRightCorner != null && !otherScrollBarView.contentBottomRightCorner.Visible) {
 					otherScrollBarView.contentBottomRightCorner.Visible = true;
 					otherScrollBarView.contentBottomRightCorner.Visible = true;
 				}
 				}
 			} else if (!showScrollIndicator) {
 			} else if (!showScrollIndicator) {
-				if (contentBottomRightCorner != null) {
+				if (contentBottomRightCorner != null && contentBottomRightCorner.Visible) {
 					contentBottomRightCorner.Visible = false;
 					contentBottomRightCorner.Visible = false;
-				} else if (otherScrollBarView != null && otherScrollBarView.contentBottomRightCorner != null) {
+				} else if (otherScrollBarView != null && otherScrollBarView.contentBottomRightCorner != null && otherScrollBarView.contentBottomRightCorner.Visible) {
 					otherScrollBarView.contentBottomRightCorner.Visible = false;
 					otherScrollBarView.contentBottomRightCorner.Visible = false;
 				}
 				}
 				if (Application.MouseGrabView != null && Application.MouseGrabView == this) {
 				if (Application.MouseGrabView != null && Application.MouseGrabView == this) {
 					Application.UngrabMouse ();
 					Application.UngrabMouse ();
 				}
 				}
-			} else if (contentBottomRightCorner != null) {
+			} else if (contentBottomRightCorner != null && contentBottomRightCorner.Visible) {
 				contentBottomRightCorner.Visible = false;
 				contentBottomRightCorner.Visible = false;
-			} else if (otherScrollBarView != null && otherScrollBarView.contentBottomRightCorner != null) {
+			} else if (otherScrollBarView != null && otherScrollBarView.contentBottomRightCorner != null && otherScrollBarView.contentBottomRightCorner.Visible) {
 				otherScrollBarView.contentBottomRightCorner.Visible = false;
 				otherScrollBarView.contentBottomRightCorner.Visible = false;
 			}
 			}
 			if (Host?.Visible == true && showScrollIndicator && !Visible) {
 			if (Host?.Visible == true && showScrollIndicator && !Visible) {