Fix the editor theme application for the Mono build log

This commit is contained in:
Yuri Sizov 2021-08-03 21:45:25 +03:00
parent cae29b5267
commit 3857fd5ceb
2 changed files with 15 additions and 2 deletions

View File

@ -156,6 +156,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#a5b7f3", "#3d64dd"); // 2d ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#a5b7f3", "#3d64dd"); // 2d
ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#708cea", "#1a3eac"); // 2d dark ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#708cea", "#1a3eac"); // 2d dark
ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#a5efac", "#2fa139"); // control ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#a5efac", "#2fa139"); // control
ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ffdd65", "#ca8a04"); // node warning
// rainbow // rainbow
ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ff7070", "#ff2929"); // red ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ff7070", "#ff2929"); // red
@ -231,7 +232,6 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
exceptions.insert("StatusError"); exceptions.insert("StatusError");
exceptions.insert("StatusSuccess"); exceptions.insert("StatusSuccess");
exceptions.insert("StatusWarning"); exceptions.insert("StatusWarning");
exceptions.insert("NodeWarning");
exceptions.insert("OverbrightIndicator"); exceptions.insert("OverbrightIndicator");
} }
@ -974,6 +974,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("folded", "TextEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons")); theme->set_icon("folded", "TextEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons"));
theme->set_icon("fold", "TextEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); theme->set_icon("fold", "TextEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons"));
theme->set_color("font_color", "TextEdit", font_color); theme->set_color("font_color", "TextEdit", font_color);
theme->set_color("font_color_readonly", "TextEdit", font_color_readonly);
theme->set_color("caret_color", "TextEdit", font_color); theme->set_color("caret_color", "TextEdit", font_color);
theme->set_color("selection_color", "TextEdit", font_color_selection); theme->set_color("selection_color", "TextEdit", font_color_selection);

View File

@ -11,6 +11,7 @@ namespace GodotTools.Build
{ {
public BuildOutputView BuildOutputView { get; private set; } public BuildOutputView BuildOutputView { get; private set; }
private MenuButton buildMenuBtn;
private Button errorsBtn; private Button errorsBtn;
private Button warningsBtn; private Button warningsBtn;
private Button viewLogBtn; private Button viewLogBtn;
@ -115,7 +116,7 @@ namespace GodotTools.Build
var toolBarHBox = new HBoxContainer {SizeFlagsHorizontal = (int)SizeFlags.ExpandFill}; var toolBarHBox = new HBoxContainer {SizeFlagsHorizontal = (int)SizeFlags.ExpandFill};
AddChild(toolBarHBox); AddChild(toolBarHBox);
var buildMenuBtn = new MenuButton {Text = "Build", Icon = GetIcon("Play", "EditorIcons")}; buildMenuBtn = new MenuButton {Text = "Build", Icon = GetIcon("Play", "EditorIcons")};
toolBarHBox.AddChild(buildMenuBtn); toolBarHBox.AddChild(buildMenuBtn);
var buildMenu = buildMenuBtn.GetPopup(); var buildMenu = buildMenuBtn.GetPopup();
@ -161,5 +162,16 @@ namespace GodotTools.Build
BuildOutputView = new BuildOutputView(); BuildOutputView = new BuildOutputView();
AddChild(BuildOutputView); AddChild(BuildOutputView);
} }
public override void _Notification(int what)
{
base._Notification(what);
if (what == NotificationThemeChanged) {
buildMenuBtn.Icon = GetIcon("Play", "EditorIcons");
errorsBtn.Icon = GetIcon("StatusError", "EditorIcons");
warningsBtn.Icon = GetIcon("NodeWarning", "EditorIcons");
}
}
} }
} }