浏览代码

Fixes #2641. ContentBottomRightCorner should only draw his background with a empty. (#2642)

BDisp 2 年之前
父节点
当前提交
474a1968fa
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      Terminal.Gui/Views/ScrollBarView.cs

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

@@ -119,7 +119,7 @@ namespace Terminal.Gui {
 			if (Host != null && (_contentBottomRightCorner == null && OtherScrollBarView == null
 				|| (_contentBottomRightCorner == null && OtherScrollBarView != null && OtherScrollBarView._contentBottomRightCorner == null))) {
 
-				_contentBottomRightCorner = new View (" ") {
+				_contentBottomRightCorner = new View () {
 					Id = "contentBottomRightCorner",
 					Visible = Host.Visible,
 					ClearOnVisibleFalse = false,
@@ -135,9 +135,15 @@ namespace Terminal.Gui {
 				_contentBottomRightCorner.Width = 1;
 				_contentBottomRightCorner.Height = 1;
 				_contentBottomRightCorner.MouseClick += ContentBottomRightCorner_MouseClick;
+				_contentBottomRightCorner.DrawContent += _contentBottomRightCorner_DrawContent;
 			}
 		}
 
+		private void _contentBottomRightCorner_DrawContent (object sender, DrawEventArgs e)
+		{
+			Driver.SetAttribute (Host.HasFocus ? ColorScheme.Focus : GetNormalColor ());
+		}
+
 		private void Host_VisibleChanged (object sender, EventArgs e)
 		{
 			if (!Host.Visible) {