From db0c27a376e59bc882559d45934621b3b184762c Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 24 May 2022 07:56:31 -0700 Subject: [PATCH] Properly show disabled stringview --- IDE/src/ui/WatchPanel.bf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/IDE/src/ui/WatchPanel.bf b/IDE/src/ui/WatchPanel.bf index 5ac94bb6..d25ad34b 100644 --- a/IDE/src/ui/WatchPanel.bf +++ b/IDE/src/ui/WatchPanel.bf @@ -793,7 +793,7 @@ namespace IDE.ui } } - public override void DrawAll(Graphics g) + void DoDrawAll(Graphics g) { g.SetFont(DarkTheme.sDarkTheme.mSmallFont); var editWidgetContent = mEditWidget.Content; @@ -884,6 +884,20 @@ namespace IDE.ui base.DrawAll(g); } + public override void DrawAll(Graphics g) + { + uint32 color = Color.White; + if (var lvItem = mParent as WatchListViewItem) + { + var headItem = lvItem.GetSubItem(0) as WatchListViewItem; + if ((headItem.mDisabled) || (lvItem.mFailed)) + color = 0xFFFF4040; + } + + using (g.PushColor(color)) + DoDrawAll(g); + } + public override void Resize(float x, float y, float width, float height) { base.Resize(x, y, width, height);