浏览代码

Fixes #1143. Cannot change the MenuBar's background color. (#1144)

Well done. Thanks.
BDisp 4 年之前
父节点
当前提交
e009aa747f
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Terminal.Gui/Views/Menu.cs

+ 3 - 3
Terminal.Gui/Views/Menu.cs

@@ -402,7 +402,7 @@ namespace Terminal.Gui {
 			this.host = host;
 			this.host = host;
 			if (barItems.IsTopLevel) {
 			if (barItems.IsTopLevel) {
 				// This is a standalone MenuItem on a MenuBar
 				// This is a standalone MenuItem on a MenuBar
-				ColorScheme = Colors.Menu;
+				ColorScheme = host.ColorScheme;
 				CanFocus = true;
 				CanFocus = true;
 			} else {
 			} else {
 
 
@@ -413,7 +413,7 @@ namespace Terminal.Gui {
 						break;
 						break;
 					}
 					}
 				}
 				}
-				ColorScheme = Colors.Menu;
+				ColorScheme = host.ColorScheme;
 				CanFocus = true;
 				CanFocus = true;
 				WantMousePositionReports = host.WantMousePositionReports;
 				WantMousePositionReports = host.WantMousePositionReports;
 			}
 			}
@@ -905,7 +905,7 @@ namespace Terminal.Gui {
 		public override void Redraw (Rect bounds)
 		public override void Redraw (Rect bounds)
 		{
 		{
 			Move (0, 0);
 			Move (0, 0);
-			Driver.SetAttribute (Colors.Menu.Normal);
+			Driver.SetAttribute (ColorScheme.Normal);
 			for (int i = 0; i < Frame.Width; i++)
 			for (int i = 0; i < Frame.Width; i++)
 				Driver.AddRune (' ');
 				Driver.AddRune (' ');