From 474a1968fa3b845e385c37d3c76db87f0de7bc52 Mon Sep 17 00:00:00 2001 From: BDisp Date: Sat, 20 May 2023 08:23:17 +0100 Subject: [PATCH] Fixes #2641. ContentBottomRightCorner should only draw his background with a empty. (#2642) --- Terminal.Gui/Views/ScrollBarView.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/ScrollBarView.cs b/Terminal.Gui/Views/ScrollBarView.cs index 8a8a16c68..471232cc5 100644 --- a/Terminal.Gui/Views/ScrollBarView.cs +++ b/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) {