2
0
Эх сурвалжийг харах

Properly show disabled stringview

Brian Fiete 3 жил өмнө
parent
commit
db0c27a376
1 өөрчлөгдсөн 15 нэмэгдсэн , 1 устгасан
  1. 15 1
      IDE/src/ui/WatchPanel.bf

+ 15 - 1
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);