New customizable editor theme
|
@ -1035,7 +1035,7 @@ void AnimationKeyEditor::_track_pos_draw() {
|
|||
//draw position
|
||||
int pixel = (timeline_pos - h_scroll->get_value()) * zoom_scale;
|
||||
pixel += name_limit;
|
||||
track_pos->draw_line(ofs + Point2(pixel, 0), ofs + Point2(pixel, size.height), Color(1, 0.3, 0.3, 0.8));
|
||||
track_pos->draw_line(ofs + Point2(pixel, 0), ofs + Point2(pixel, size.height), get_color("highlight_color", "Editor"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1089,13 +1089,12 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||
int sep = get_constant("vseparation", "Tree");
|
||||
int hsep = get_constant("hseparation", "Tree");
|
||||
Color color = get_color("font_color", "Tree");
|
||||
Color sepcolor = get_color("guide_color", "Tree");
|
||||
Color timecolor = get_color("prop_subsection", "Editor");
|
||||
timecolor = Color::html("ff4a414f");
|
||||
Color sepcolor = get_color("light_color_1", "Editor");
|
||||
Color timecolor = get_color("dark_color_2", "Editor");
|
||||
Color hover_color = Color(1, 1, 1, 0.05);
|
||||
Color select_color = Color(1, 1, 1, 0.1);
|
||||
Color invalid_path_color = Color(1, 0.6, 0.4, 0.5);
|
||||
Color track_select_color = Color::html("ffbd8e8e");
|
||||
Color track_select_color = get_color("highlight_color", "Editor");
|
||||
|
||||
Ref<Texture> remove_icon = get_icon("Remove", "EditorIcons");
|
||||
Ref<Texture> move_up_icon = get_icon("MoveUp", "EditorIcons");
|
||||
|
@ -1179,11 +1178,7 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||
|
||||
int end_px = (l - h_scroll->get_value()) * scale;
|
||||
int begin_px = -h_scroll->get_value() * scale;
|
||||
Color notimecol;
|
||||
notimecol.r = timecolor.gray();
|
||||
notimecol.g = notimecol.r;
|
||||
notimecol.b = notimecol.r;
|
||||
notimecol.a = timecolor.a;
|
||||
Color notimecol = get_color("light_color_1", "Editor");
|
||||
|
||||
{
|
||||
|
||||
|
@ -1483,7 +1478,9 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||
switch (click.click) {
|
||||
case ClickOver::CLICK_SELECT_KEYS: {
|
||||
|
||||
te->draw_rect(Rect2(click.at, click.to - click.at), Color(0.7, 0.7, 1.0, 0.5));
|
||||
Color box_color = get_color("highlight_color", "Editor");
|
||||
box_color.a = 0.35;
|
||||
te->draw_rect(Rect2(click.at, click.to - click.at), box_color);
|
||||
|
||||
} break;
|
||||
case ClickOver::CLICK_MOVE_KEYS: {
|
||||
|
@ -2891,6 +2888,8 @@ void AnimationKeyEditor::_notification(int p_what) {
|
|||
key_editor->edit(key_edit);
|
||||
|
||||
zoomicon->set_texture(get_icon("Zoom", "EditorIcons"));
|
||||
zoomicon->set_custom_minimum_size(Size2(24 * EDSCALE, 0));
|
||||
zoomicon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
|
||||
|
||||
menu_add_track->set_icon(get_icon("AddTrack", "EditorIcons"));
|
||||
menu_add_track->get_popup()->add_icon_item(get_icon("KeyValue", "EditorIcons"), "Add Normal Track", ADD_TRACK_MENU_ADD_VALUE_TRACK);
|
||||
|
@ -3928,6 +3927,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||
v_scroll->set_value(0);
|
||||
|
||||
key_editor_tab = memnew(TabContainer);
|
||||
key_editor_tab->set_tab_align(TabContainer::ALIGN_LEFT);
|
||||
hb->add_child(key_editor_tab);
|
||||
key_editor_tab->set_custom_minimum_size(Size2(200, 0));
|
||||
|
||||
|
|
|
@ -419,6 +419,10 @@ void ConnectionsDock::_notification(int p_what) {
|
|||
//RID ci = get_canvas_item();
|
||||
//get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
|
||||
}
|
||||
|
||||
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
update_tree();
|
||||
}
|
||||
}
|
||||
|
||||
void ConnectionsDock::_close() {
|
||||
|
|
|
@ -87,6 +87,9 @@ void EditorLog::_notification(int p_what) {
|
|||
log->add_color_override("default_color", get_color("font_color", "Tree"));
|
||||
//button->set_icon(get_icon("Console","EditorIcons"));
|
||||
}
|
||||
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
_override_logger_styles();
|
||||
}
|
||||
|
||||
/*if (p_what==NOTIFICATION_DRAW) {
|
||||
|
||||
|
|
|
@ -356,11 +356,17 @@ void EditorNode::_notification(int p_what) {
|
|||
if (p_what == MainLoop::NOTIFICATION_WM_QUIT_REQUEST) {
|
||||
|
||||
_menu_option_confirm(FILE_QUIT, false);
|
||||
};
|
||||
}
|
||||
|
||||
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
||||
property_editor->set_enable_capitalize_paths(bool(EDITOR_DEF("interface/capitalize_properties", true)));
|
||||
Ref<Theme> theme = create_editor_theme();
|
||||
theme_base->set_theme(theme);
|
||||
gui_base->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles"));
|
||||
play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
|
||||
scene_root_parent->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
|
||||
bottom_panel->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2699,6 +2705,8 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor) {
|
|||
tb->set_toggle_mode(true);
|
||||
tb->connect("pressed", singleton, "_editor_select", varray(singleton->main_editor_buttons.size()));
|
||||
tb->set_text(p_editor->get_name());
|
||||
tb->set_icon(p_editor->get_base_control()->get_icon(p_editor->get_name(), "EditorIcons"));
|
||||
tb->set_name(p_editor->get_name());
|
||||
singleton->main_editor_buttons.push_back(tb);
|
||||
singleton->main_editor_button_vb->add_child(tb);
|
||||
singleton->editor_table.push_back(p_editor);
|
||||
|
@ -4682,6 +4690,23 @@ void EditorNode::_dim_timeout() {
|
|||
}
|
||||
}
|
||||
|
||||
void EditorNode::_check_gui_base_size() {
|
||||
print_line(itos(int(gui_base->get_size().width)));
|
||||
if (gui_base->get_size().width > 1200 * EDSCALE) {
|
||||
for (int i = 0; i < singleton->main_editor_button_vb->get_child_count(); i++) {
|
||||
ToolButton *btn = singleton->main_editor_button_vb->get_child(i)->cast_to<ToolButton>();
|
||||
if (btn == singleton->distraction_free) continue;
|
||||
btn->set_text(btn->get_name());
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < singleton->main_editor_button_vb->get_child_count(); i++) {
|
||||
ToolButton *btn = singleton->main_editor_button_vb->get_child(i)->cast_to<ToolButton>();
|
||||
if (btn == singleton->distraction_free) continue;
|
||||
btn->set_text("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EditorNode::open_export_template_manager() {
|
||||
|
||||
export_template_manager->popup_manager();
|
||||
|
@ -4764,6 +4789,7 @@ void EditorNode::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("_open_imported"), &EditorNode::_open_imported);
|
||||
ClassDB::bind_method(D_METHOD("_inherit_imported"), &EditorNode::_inherit_imported);
|
||||
ClassDB::bind_method(D_METHOD("_dim_timeout"), &EditorNode::_dim_timeout);
|
||||
ClassDB::bind_method(D_METHOD("_check_gui_base_size"), &EditorNode::_check_gui_base_size);
|
||||
|
||||
ADD_SIGNAL(MethodInfo("play_pressed"));
|
||||
ADD_SIGNAL(MethodInfo("pause_pressed"));
|
||||
|
@ -4893,17 +4919,19 @@ EditorNode::EditorNode() {
|
|||
ClassDB::set_class_enabled("CollisionShape2D", true);
|
||||
ClassDB::set_class_enabled("CollisionPolygon2D", true);
|
||||
|
||||
Control *theme_base = memnew(Control);
|
||||
theme_base = memnew(Control);
|
||||
add_child(theme_base);
|
||||
theme_base->set_area_as_parent_rect();
|
||||
|
||||
gui_base = memnew(Panel);
|
||||
theme_base->add_child(gui_base);
|
||||
gui_base->set_area_as_parent_rect();
|
||||
gui_base->connect("item_rect_changed", this, "_check_gui_base_size");
|
||||
|
||||
Ref<Theme> theme = create_editor_theme();
|
||||
theme_base->set_theme(theme);
|
||||
gui_base->set_theme(create_custom_theme());
|
||||
gui_base->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles"));
|
||||
|
||||
resource_preview = memnew(EditorResourcePreview);
|
||||
add_child(resource_preview);
|
||||
|
@ -4918,6 +4946,7 @@ EditorNode::EditorNode() {
|
|||
main_vbox = memnew(VBoxContainer);
|
||||
gui_base->add_child(main_vbox);
|
||||
main_vbox->set_area_as_parent_rect(8);
|
||||
main_vbox->set_margin(MARGIN_TOP, 5);
|
||||
|
||||
#if 0
|
||||
PanelContainer *top_dark_panel = memnew( PanelContainer );
|
||||
|
@ -5054,7 +5083,7 @@ EditorNode::EditorNode() {
|
|||
dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
dock_slot[i]->set_popup(dock_select_popoup);
|
||||
dock_slot[i]->connect("pre_popup_pressed", this, "_dock_pre_popup", varray(i));
|
||||
//dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT);
|
||||
dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT);
|
||||
}
|
||||
|
||||
dock_drag_timer = memnew(Timer);
|
||||
|
@ -5079,7 +5108,7 @@ EditorNode::EditorNode() {
|
|||
*/
|
||||
scene_tabs = memnew(Tabs);
|
||||
scene_tabs->add_tab("unsaved");
|
||||
scene_tabs->set_tab_align(Tabs::ALIGN_CENTER);
|
||||
scene_tabs->set_tab_align(Tabs::ALIGN_LEFT);
|
||||
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
||||
scene_tabs->connect("tab_changed", this, "_scene_tab_changed");
|
||||
scene_tabs->connect("right_button_pressed", this, "_scene_tab_script_edited");
|
||||
|
@ -5089,7 +5118,7 @@ EditorNode::EditorNode() {
|
|||
|
||||
scene_root_parent = memnew(PanelContainer);
|
||||
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
|
||||
scene_root_parent->add_style_override("panel", gui_base->get_stylebox("EditorPanel", "EditorStyles"));
|
||||
scene_root_parent->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
|
||||
|
||||
//Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel","TabContainer");
|
||||
//scene_root_parent->add_style_override("panel",sp);
|
||||
|
@ -5122,7 +5151,7 @@ EditorNode::EditorNode() {
|
|||
scene_root_parent->add_child(viewport);
|
||||
|
||||
PanelContainer *top_region = memnew(PanelContainer);
|
||||
top_region->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
|
||||
top_region->add_style_override("panel", gui_base->get_stylebox("MenuPanel", "EditorStyles"));
|
||||
HBoxContainer *left_menu_hb = memnew(HBoxContainer);
|
||||
top_region->add_child(left_menu_hb);
|
||||
menu_hb->add_child(top_region);
|
||||
|
@ -5133,6 +5162,7 @@ EditorNode::EditorNode() {
|
|||
file_menu->set_text(TTR("Scene"));
|
||||
//file_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
|
||||
left_menu_hb->add_child(file_menu);
|
||||
file_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
|
||||
|
||||
prev_scene = memnew(ToolButton);
|
||||
prev_scene->set_icon(gui_base->get_icon("PrevScene", "EditorIcons"));
|
||||
|
@ -5205,7 +5235,6 @@ EditorNode::EditorNode() {
|
|||
}
|
||||
|
||||
PanelContainer *editor_region = memnew(PanelContainer);
|
||||
editor_region->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
|
||||
main_editor_button_vb = memnew(HBoxContainer);
|
||||
editor_region->add_child(main_editor_button_vb);
|
||||
menu_hb->add_child(editor_region);
|
||||
|
@ -5249,6 +5278,7 @@ EditorNode::EditorNode() {
|
|||
tool_menu = memnew(MenuButton);
|
||||
tool_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools."));
|
||||
tool_menu->set_text(TTR("Tools"));
|
||||
tool_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
|
||||
|
||||
//tool_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
|
||||
left_menu_hb->add_child(tool_menu);
|
||||
|
@ -5262,6 +5292,7 @@ EditorNode::EditorNode() {
|
|||
export_button->set_text(TTR("Export"));
|
||||
export_button->connect("pressed", this, "_menu_option", varray(FILE_EXPORT_PROJECT));
|
||||
export_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
export_button->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
|
||||
left_menu_hb->add_child(export_button);
|
||||
|
||||
menu_hb->add_spacer();
|
||||
|
@ -5278,12 +5309,12 @@ EditorNode::EditorNode() {
|
|||
play_cc->set_anchor_and_margin(MARGIN_BOTTOM, Control::ANCHOR_BEGIN, 10);
|
||||
play_cc->set_margin(MARGIN_TOP, 5);
|
||||
|
||||
top_region = memnew(PanelContainer);
|
||||
top_region->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
|
||||
play_cc->add_child(top_region);
|
||||
play_button_panel = memnew(PanelContainer);
|
||||
play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
|
||||
play_cc->add_child(play_button_panel);
|
||||
|
||||
HBoxContainer *play_hb = memnew(HBoxContainer);
|
||||
top_region->add_child(play_hb);
|
||||
play_button_panel->add_child(play_hb);
|
||||
|
||||
play_button = memnew(ToolButton);
|
||||
play_hb->add_child(play_button);
|
||||
|
@ -5399,7 +5430,6 @@ EditorNode::EditorNode() {
|
|||
}
|
||||
|
||||
PanelContainer *vu_cont = memnew(PanelContainer);
|
||||
vu_cont->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
|
||||
menu_hb->add_child(vu_cont);
|
||||
|
||||
audio_vu = memnew(TextureProgress);
|
||||
|
@ -5420,13 +5450,13 @@ EditorNode::EditorNode() {
|
|||
}
|
||||
|
||||
top_region = memnew(PanelContainer);
|
||||
top_region->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
|
||||
HBoxContainer *right_menu_hb = memnew(HBoxContainer);
|
||||
top_region->add_child(right_menu_hb);
|
||||
menu_hb->add_child(top_region);
|
||||
|
||||
settings_menu = memnew(MenuButton);
|
||||
settings_menu->set_text(TTR("Settings"));
|
||||
settings_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
|
||||
//settings_menu->set_anchor(MARGIN_RIGHT,ANCHOR_END);
|
||||
right_menu_hb->add_child(settings_menu);
|
||||
p = settings_menu->get_popup();
|
||||
|
@ -5676,7 +5706,7 @@ EditorNode::EditorNode() {
|
|||
_update_layouts_menu();
|
||||
|
||||
bottom_panel = memnew(PanelContainer);
|
||||
bottom_panel->add_style_override("panel", gui_base->get_stylebox("EditorPanel", "EditorStyles"));
|
||||
bottom_panel->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
|
||||
center_split->add_child(bottom_panel);
|
||||
center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
|
||||
|
||||
|
|
|
@ -205,8 +205,10 @@ private:
|
|||
//Ref<ResourceImportMetadata> scene_import_metadata;
|
||||
|
||||
PanelContainer *scene_root_parent;
|
||||
Control *theme_base;
|
||||
Control *gui_base;
|
||||
VBoxContainer *main_vbox;
|
||||
PanelContainer *play_button_panel;
|
||||
|
||||
//split
|
||||
|
||||
|
@ -604,6 +606,7 @@ private:
|
|||
|
||||
void _start_dimming(bool p_dimming);
|
||||
void _dim_timeout();
|
||||
void _check_gui_base_size();
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
|
|
|
@ -599,6 +599,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
|
||||
set("editors/poly_editor/point_grab_radius", 8);
|
||||
|
||||
set("editors/theme/base_color", Color(0.3, 0.3, 0.3, 1));
|
||||
hints["editors/theme/base_color"] = PropertyInfo(Variant::COLOR, "editors/theme/base_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
set("editors/theme/contrast", 0.2);
|
||||
hints["editors/theme/contrast"] = PropertyInfo(Variant::REAL, "editors/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
|
||||
|
||||
set("run/window_placement/rect", 0);
|
||||
hints["run/window_placement/rect"] = PropertyInfo(Variant::INT, "run/window_placement/rect", PROPERTY_HINT_ENUM, "Default,Centered,Custom Position,Force Maximized,Force Full Screen");
|
||||
String screen_hints = TTR("Default (Same as Editor)");
|
||||
|
|
|
@ -35,25 +35,383 @@
|
|||
#include "editor_scale.h"
|
||||
#include "editor_settings.h"
|
||||
|
||||
static Ref<StyleBoxTexture> make_stylebox(Ref<Texture> texture, float p_left, float p_top, float p_right, float p_botton, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_botton = -1, bool p_draw_center = true) {
|
||||
Ref<StyleBoxTexture> style(memnew(StyleBoxTexture));
|
||||
style->set_texture(texture);
|
||||
style->set_margin_size(MARGIN_LEFT, p_left * EDSCALE);
|
||||
style->set_margin_size(MARGIN_RIGHT, p_right * EDSCALE);
|
||||
style->set_margin_size(MARGIN_BOTTOM, p_botton * EDSCALE);
|
||||
style->set_margin_size(MARGIN_TOP, p_top * EDSCALE);
|
||||
style->set_default_margin(MARGIN_LEFT, p_margin_left * EDSCALE);
|
||||
style->set_default_margin(MARGIN_RIGHT, p_margin_right * EDSCALE);
|
||||
style->set_default_margin(MARGIN_BOTTOM, p_margin_botton * EDSCALE);
|
||||
style->set_default_margin(MARGIN_TOP, p_margin_top * EDSCALE);
|
||||
style->set_draw_center(p_draw_center);
|
||||
return style;
|
||||
}
|
||||
|
||||
static Ref<StyleBoxEmpty> make_empty_stylebox(float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
|
||||
Ref<StyleBoxEmpty> style(memnew(StyleBoxEmpty));
|
||||
style->set_default_margin(MARGIN_LEFT, p_margin_left * EDSCALE);
|
||||
style->set_default_margin(MARGIN_RIGHT, p_margin_right * EDSCALE);
|
||||
style->set_default_margin(MARGIN_BOTTOM, p_margin_bottom * EDSCALE);
|
||||
style->set_default_margin(MARGIN_TOP, p_margin_top * EDSCALE);
|
||||
return style;
|
||||
}
|
||||
|
||||
static Ref<StyleBoxFlat> make_flat_stylebox(Color color, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
|
||||
Ref<StyleBoxFlat> style(memnew(StyleBoxFlat));
|
||||
style->set_bg_color(color);
|
||||
style->set_default_margin(MARGIN_LEFT, p_margin_left * EDSCALE);
|
||||
style->set_default_margin(MARGIN_RIGHT, p_margin_right * EDSCALE);
|
||||
style->set_default_margin(MARGIN_BOTTOM, p_margin_bottom * EDSCALE);
|
||||
style->set_default_margin(MARGIN_TOP, p_margin_top * EDSCALE);
|
||||
return style;
|
||||
}
|
||||
|
||||
static Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat> p_style, Color p_color) {
|
||||
Ref<StyleBoxFlat> style = p_style->duplicate();
|
||||
style->set_light_color(p_color);
|
||||
style->set_dark_color(p_color);
|
||||
return style;
|
||||
}
|
||||
|
||||
static Ref<StyleBoxFlat> add_additional_border(Ref<StyleBoxFlat> p_style, int p_left, int p_top, int p_right, int p_bottom) {
|
||||
Ref<StyleBoxFlat> style = p_style->duplicate();
|
||||
style->_set_additional_border_size(MARGIN_LEFT, p_left * EDSCALE);
|
||||
style->_set_additional_border_size(MARGIN_RIGHT, p_right * EDSCALE);
|
||||
style->_set_additional_border_size(MARGIN_TOP, p_top * EDSCALE);
|
||||
style->_set_additional_border_size(MARGIN_BOTTOM, p_bottom * EDSCALE);
|
||||
return style;
|
||||
}
|
||||
|
||||
#define HIGHLIGHT_COLOR_LIGHT highlight_color.linear_interpolate(Color(1, 1, 1, 1), 0.3)
|
||||
#define HIGHLIGHT_COLOR_DARK highlight_color.linear_interpolate(Color(0, 0, 0, 1), 0.5)
|
||||
|
||||
Ref<Theme> create_editor_theme() {
|
||||
Ref<Theme> theme = Ref<Theme>(memnew(Theme));
|
||||
|
||||
editor_register_fonts(theme);
|
||||
editor_register_icons(theme);
|
||||
|
||||
Ref<StyleBoxTexture> focus_sbt = memnew(StyleBoxTexture);
|
||||
focus_sbt->set_texture(theme->get_icon("EditorFocus", "EditorIcons"));
|
||||
for (int i = 0; i < 4; i++) {
|
||||
focus_sbt->set_margin_size(Margin(i), 16 * EDSCALE);
|
||||
focus_sbt->set_default_margin(Margin(i), 16 * EDSCALE);
|
||||
}
|
||||
// Define colors
|
||||
Color highlight_color = EDITOR_DEF("editors/theme/highlight_color", Color::html("#6ca9f3"));
|
||||
Color base_color = EDITOR_DEF("editors/theme/base_color", Color::html("#2e3742"));
|
||||
float contrast = EDITOR_DEF("editors/theme/contrast", 0.2);
|
||||
|
||||
Color dark_color_1 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast);
|
||||
Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 2);
|
||||
Color dark_color_3 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 3);
|
||||
|
||||
Color light_color_1 = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast);
|
||||
Color light_color_2 = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast * 2);
|
||||
|
||||
theme->set_color("highlight_color", "Editor", highlight_color);
|
||||
theme->set_color("base_color", "Editor", base_color);
|
||||
theme->set_color("dark_color_1", "Editor", dark_color_1);
|
||||
theme->set_color("dark_color_2", "Editor", dark_color_2);
|
||||
theme->set_color("dark_color_3", "Editor", dark_color_3);
|
||||
theme->set_color("light_color_1", "Editor", light_color_1);
|
||||
theme->set_color("light_color_2", "Editor", light_color_2);
|
||||
|
||||
// Checkbox icon
|
||||
theme->set_icon("checked", "CheckBox", theme->get_icon("Checked", "EditorIcons"));
|
||||
theme->set_icon("unchecked", "CheckBox", theme->get_icon("Unchecked", "EditorIcons"));
|
||||
theme->set_icon("checked", "PopupMenu", theme->get_icon("Checked", "EditorIcons"));
|
||||
theme->set_icon("unchecked", "PopupMenu", theme->get_icon("Unchecked", "EditorIcons"));
|
||||
|
||||
// Editor background
|
||||
Ref<StyleBoxFlat> style_background = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
|
||||
theme->set_stylebox("Background", "EditorStyles", style_background);
|
||||
|
||||
// Focus
|
||||
Ref<StyleBoxFlat> focus_sbt = make_flat_stylebox(light_color_1, 4, 4, 4, 4);
|
||||
focus_sbt->set_draw_center(false);
|
||||
theme->set_stylebox("EditorFocus", "EditorStyles", focus_sbt);
|
||||
theme->set_color("prop_category", "Editor", Color::hex(0x3f3a44ff));
|
||||
theme->set_color("prop_section", "Editor", Color::hex(0x35313aff));
|
||||
theme->set_color("prop_subsection", "Editor", Color::hex(0x312e37ff));
|
||||
focus_sbt->set_border_size(1 * EDSCALE);
|
||||
focus_sbt = change_border_color(focus_sbt, light_color_2);
|
||||
theme->set_stylebox("Focus", "EditorStyles", focus_sbt);
|
||||
|
||||
// Menu
|
||||
Ref<StyleBoxEmpty> style_menu = make_empty_stylebox(4, 4, 4, 4);
|
||||
theme->set_stylebox("panel", "PanelContainer", style_menu);
|
||||
theme->set_stylebox("MenuPanel", "EditorStyles", style_menu);
|
||||
|
||||
// Play button group
|
||||
theme->set_stylebox("PlayButtonPanel", "EditorStyles", make_stylebox(theme->get_icon("PlayButtonGroup", "EditorIcons"), 16, 16, 16, 16, 8, 4, 8, 4));
|
||||
|
||||
Ref<StyleBoxFlat> style_menu_hover_border = make_flat_stylebox(highlight_color, 4, 4, 4, 4);
|
||||
Ref<StyleBoxFlat> style_menu_hover_bg = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
|
||||
|
||||
style_menu_hover_border->set_draw_center(false);
|
||||
style_menu_hover_border->_set_additional_border_size(MARGIN_BOTTOM, 1 * EDSCALE);
|
||||
theme->set_stylebox("normal", "MenuButton", style_menu);
|
||||
theme->set_stylebox("hover", "MenuButton", style_menu);
|
||||
theme->set_stylebox("pressed", "MenuButton", style_menu);
|
||||
theme->set_stylebox("focus", "MenuButton", style_menu);
|
||||
theme->set_stylebox("disabled", "MenuButton", style_menu);
|
||||
|
||||
theme->set_stylebox("normal", "PopupMenu", style_menu);
|
||||
theme->set_stylebox("hover", "PopupMenu", style_menu_hover_bg);
|
||||
theme->set_stylebox("pressed", "PopupMenu", style_menu);
|
||||
theme->set_stylebox("focus", "PopupMenu", style_menu);
|
||||
theme->set_stylebox("disabled", "PopupMenu", style_menu);
|
||||
|
||||
theme->set_stylebox("normal", "ToolButton", style_menu);
|
||||
theme->set_stylebox("hover", "ToolButton", style_menu);
|
||||
theme->set_stylebox("pressed", "ToolButton", style_menu);
|
||||
theme->set_stylebox("focus", "ToolButton", style_menu);
|
||||
theme->set_stylebox("disabled", "ToolButton", style_menu);
|
||||
|
||||
theme->set_color("font_color_hover", "MenuButton", HIGHLIGHT_COLOR_LIGHT);
|
||||
theme->set_color("font_color_hover", "ToolButton", HIGHLIGHT_COLOR_LIGHT);
|
||||
theme->set_color("font_color_pressed", "ToolButton", highlight_color);
|
||||
|
||||
theme->set_stylebox("MenuHover", "EditorStyles", style_menu_hover_border);
|
||||
|
||||
// Content of each tab
|
||||
Ref<StyleBoxFlat> style_panel = make_flat_stylebox(base_color, 1, 4, 1, 1);
|
||||
theme->set_stylebox("panel", "TabContainer", style_panel);
|
||||
theme->set_stylebox("Content", "EditorStyles", style_panel);
|
||||
|
||||
// Button
|
||||
Ref<StyleBoxFlat> style_button = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
|
||||
style_button->set_draw_center(true);
|
||||
style_button->set_border_size(2 * EDSCALE);
|
||||
style_button->set_light_color(light_color_1);
|
||||
style_button->set_dark_color(light_color_1);
|
||||
style_button->set_border_blend(false);
|
||||
theme->set_stylebox("normal", "Button", style_button);
|
||||
theme->set_stylebox("hover", "Button", style_button);
|
||||
theme->set_stylebox("pressed", "Button", style_button);
|
||||
theme->set_stylebox("focus", "Button", style_button);
|
||||
theme->set_stylebox("disabled", "Button", style_button);
|
||||
theme->set_color("font_color_hover", "Button", HIGHLIGHT_COLOR_LIGHT);
|
||||
theme->set_color("font_color_pressed", "Button", highlight_color);
|
||||
theme->set_color("icon_color_hover", "Button", HIGHLIGHT_COLOR_LIGHT);
|
||||
// make icon color value bigger because icon image is not complete white
|
||||
theme->set_color("icon_color_pressed", "Button", Color(highlight_color.r * 1.15, highlight_color.g * 1.15, highlight_color.b * 1.15, highlight_color.a));
|
||||
|
||||
// OptionButton
|
||||
Ref<StyleBoxFlat> style_option_button = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
|
||||
style_option_button->set_border_size(1 * EDSCALE);
|
||||
style_option_button->set_light_color(light_color_1);
|
||||
style_option_button->set_dark_color(light_color_1);
|
||||
style_option_button->_set_additional_border_size(MARGIN_RIGHT, -16 * EDSCALE);
|
||||
theme->set_stylebox("hover", "OptionButton", change_border_color(style_option_button, HIGHLIGHT_COLOR_LIGHT));
|
||||
theme->set_stylebox("pressed", "OptionButton", change_border_color(style_option_button, highlight_color));
|
||||
theme->set_stylebox("focus", "OptionButton", change_border_color(style_option_button, highlight_color));
|
||||
theme->set_stylebox("disabled", "OptionButton", style_option_button);
|
||||
theme->set_stylebox("normal", "OptionButton", style_option_button);
|
||||
theme->set_icon("arrow", "OptionButton", theme->get_icon("OptionArrow", "EditorIcons"));
|
||||
|
||||
// PopupMenu
|
||||
Ref<StyleBoxFlat> style_popup_menu = make_flat_stylebox(dark_color_1, 8, 8, 8, 8);
|
||||
style_popup_menu->set_border_size(2 * EDSCALE);
|
||||
style_popup_menu->set_light_color(light_color_1);
|
||||
style_popup_menu->set_dark_color(light_color_1);
|
||||
theme->set_stylebox("panel", "PopupMenu", style_popup_menu);
|
||||
|
||||
// Tree & script background
|
||||
Ref<StyleBoxFlat> style_bg = make_flat_stylebox(dark_color_1, 0, 0, 0, 0);
|
||||
theme->set_stylebox("bg", "Tree", style_bg);
|
||||
theme->set_stylebox("ScriptPanel", "EditorStyles", style_bg);
|
||||
|
||||
// Tree
|
||||
theme->set_icon("checked", "Tree", theme->get_icon("Checked", "EditorIcons"));
|
||||
theme->set_icon("unchecked", "Tree", theme->get_icon("Unchecked", "EditorIcons"));
|
||||
theme->set_icon("arrow", "Tree", theme->get_icon("TreeArrowDown", "EditorIcons"));
|
||||
theme->set_icon("arrow_collapsed", "Tree", theme->get_icon("TreeArrowRight", "EditorIcons"));
|
||||
theme->set_icon("select_arrow", "Tree", theme->get_icon("Dropdown", "EditorIcons"));
|
||||
theme->set_stylebox("bg_focus", "Tree", focus_sbt);
|
||||
|
||||
Ref<StyleBox> style_tree_btn = make_flat_stylebox(light_color_1, 2, 4, 2, 4);
|
||||
theme->set_stylebox("button_pressed", "Tree", style_tree_btn);
|
||||
|
||||
Ref<StyleBoxFlat> style_tree_focus = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 4, 4, 4, 4);
|
||||
theme->set_stylebox("selected_focus", "Tree", style_tree_focus);
|
||||
|
||||
Ref<StyleBoxFlat> style_tree_selected = make_flat_stylebox(light_color_1, 4, 4, 4, 4);
|
||||
theme->set_stylebox("selected", "Tree", style_tree_selected);
|
||||
|
||||
Ref<StyleBoxFlat> style_tree_cursor = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 4, 4, 4, 4);
|
||||
style_tree_cursor->set_draw_center(false);
|
||||
style_tree_cursor->set_border_size(1 * EDSCALE);
|
||||
style_tree_cursor->set_light_color(light_color_1);
|
||||
style_tree_cursor->set_dark_color(light_color_1);
|
||||
Ref<StyleBoxFlat> style_tree_title = make_flat_stylebox(dark_color_3, 4, 4, 4, 4);
|
||||
theme->set_stylebox("cursor", "Tree", style_tree_cursor);
|
||||
theme->set_stylebox("cursor_unfocused", "Tree", style_tree_cursor);
|
||||
theme->set_stylebox("title_button_normal", "Tree", style_tree_title);
|
||||
theme->set_stylebox("title_button_hover", "Tree", style_tree_title);
|
||||
theme->set_stylebox("title_button_pressed", "Tree", style_tree_title);
|
||||
|
||||
theme->set_color("prop_category", "Editor", dark_color_3);
|
||||
theme->set_color("prop_section", "Editor", dark_color_1);
|
||||
theme->set_color("prop_subsection", "Editor", dark_color_2);
|
||||
theme->set_color("fg_selected", "Editor", Color::html("ffbd8e8e"));
|
||||
theme->set_color("fg_error", "Editor", Color::html("ffbd8e8e"));
|
||||
theme->set_color("drop_position_color", "Tree", highlight_color);
|
||||
|
||||
// ItemList
|
||||
Ref<StyleBoxFlat> style_itemlist_cursor = make_flat_stylebox(highlight_color, 8, 8, 8, 8);
|
||||
style_itemlist_cursor->set_draw_center(false);
|
||||
style_itemlist_cursor->set_border_size(1 * EDSCALE);
|
||||
style_itemlist_cursor->set_light_color(light_color_1);
|
||||
style_itemlist_cursor->set_dark_color(light_color_1);
|
||||
theme->set_stylebox("cursor", "ItemList", style_itemlist_cursor);
|
||||
theme->set_stylebox("cursor_unfocused", "ItemList", style_itemlist_cursor);
|
||||
theme->set_stylebox("selected_focus", "ItemList", style_tree_focus);
|
||||
theme->set_stylebox("selected", "ItemList", style_tree_selected);
|
||||
theme->set_stylebox("bg_focus", "ItemList", focus_sbt);
|
||||
theme->set_stylebox("bg", "ItemList", style_bg);
|
||||
|
||||
Ref<StyleBoxFlat> style_tab_fg = make_flat_stylebox(base_color, 15, 5, 15, 5);
|
||||
Ref<StyleBoxFlat> style_tab_bg = make_flat_stylebox(base_color, 15, 5, 15, 5);
|
||||
style_tab_bg->set_draw_center(false);
|
||||
|
||||
// Tabs & TabContainer
|
||||
theme->set_stylebox("tab_fg", "TabContainer", style_tab_fg);
|
||||
theme->set_stylebox("tab_bg", "TabContainer", style_tab_bg);
|
||||
theme->set_stylebox("tab_fg", "Tabs", style_tab_fg);
|
||||
theme->set_stylebox("tab_bg", "Tabs", style_tab_bg);
|
||||
theme->set_color("font_color_fg", "TabContainer", Color(1, 1, 1, 1));
|
||||
theme->set_color("font_color_bg", "TabContainer", light_color_2);
|
||||
theme->set_icon("menu", "TabContainer", theme->get_icon("TabMenu", "EditorIcons"));
|
||||
theme->set_icon("menu_hl", "TabContainer", theme->get_icon("TabMenu", "EditorIcons"));
|
||||
|
||||
// Debugger
|
||||
Ref<StyleBoxFlat> style_panel_debugger = make_flat_stylebox(dark_color_2, 0, 4, 0, 0);
|
||||
theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger);
|
||||
|
||||
Ref<StyleBoxFlat> style_tab_fg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);
|
||||
Ref<StyleBoxFlat> style_tab_bg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);
|
||||
style_tab_bg_debugger->set_draw_center(false);
|
||||
|
||||
theme->set_stylebox("DebuggerTabFG", "EditorStyles", style_tab_fg_debugger);
|
||||
theme->set_stylebox("DebuggerTabBG", "EditorStyles", style_tab_bg_debugger);
|
||||
|
||||
// LineEdit
|
||||
Ref<StyleBoxFlat> style_lineedit = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
|
||||
style_lineedit->set_border_size(1 * EDSCALE);
|
||||
style_lineedit->set_light_color(light_color_1);
|
||||
style_lineedit->set_dark_color(light_color_1);
|
||||
Ref<StyleBoxFlat> style_lineedit_disabled = style_lineedit->duplicate();
|
||||
style_lineedit_disabled->set_bg_color(light_color_2);
|
||||
theme->set_stylebox("normal", "LineEdit", style_lineedit);
|
||||
theme->set_stylebox("focus", "LineEdit", change_border_color(style_lineedit, highlight_color));
|
||||
theme->set_stylebox("read_only", "LineEdit", style_lineedit_disabled);
|
||||
|
||||
// TextEdit
|
||||
Ref<StyleBoxFlat> style_textedit_normal(memnew(StyleBoxFlat));
|
||||
style_textedit_normal->set_bg_color(dark_color_2);
|
||||
style_textedit_normal->set_default_margin(MARGIN_LEFT, 0);
|
||||
style_textedit_normal->set_default_margin(MARGIN_RIGHT, 0);
|
||||
style_textedit_normal->set_default_margin(MARGIN_BOTTOM, 0);
|
||||
style_textedit_normal->set_default_margin(MARGIN_TOP, 0);
|
||||
theme->set_stylebox("normal", "TextEdit", style_textedit_normal);
|
||||
theme->set_stylebox("focus", "TextEdit", focus_sbt);
|
||||
theme->set_constant("side_margin", "TabContainer", 0);
|
||||
|
||||
// H/VSplitContainer
|
||||
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("VsplitBg", "EditorIcons"), 1, 1, 1, 1));
|
||||
theme->set_stylebox("bg", "HSplitContainer", make_stylebox(theme->get_icon("HsplitBg", "EditorIcons"), 1, 1, 1, 1));
|
||||
|
||||
theme->set_icon("grabber", "VSplitContainer", theme->get_icon("Vsplitter", "EditorIcons"));
|
||||
theme->set_icon("grabber", "HSplitContainer", theme->get_icon("Hsplitter", "EditorIcons"));
|
||||
|
||||
theme->set_constant("separation", "HSplitContainer", 8 * EDSCALE);
|
||||
theme->set_constant("separation", "VSplitContainer", 8 * EDSCALE);
|
||||
|
||||
// WindowDialog
|
||||
Ref<StyleBoxFlat> style_window = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
|
||||
style_window->set_border_size(2 * EDSCALE);
|
||||
style_window->set_border_blend(false);
|
||||
style_window->set_light_color(light_color_2);
|
||||
style_window->set_dark_color(light_color_2);
|
||||
style_window->_set_additional_border_size(MARGIN_TOP, 24 * EDSCALE);
|
||||
theme->set_stylebox("panel", "WindowDialog", style_window);
|
||||
|
||||
// HScrollBar
|
||||
Ref<Texture> empty_icon = memnew(ImageTexture);
|
||||
|
||||
theme->set_stylebox("scroll", "HScrollBar", make_stylebox(theme->get_icon("ScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
|
||||
theme->set_stylebox("scroll_focus", "HScrollBar", make_stylebox(theme->get_icon("ScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
|
||||
theme->set_stylebox("grabber", "HScrollBar", make_stylebox(theme->get_icon("ScrollGrabber", "EditorIcons"), 6, 6, 6, 6, 2, 2, 2, 2));
|
||||
theme->set_stylebox("grabber_highlight", "HScrollBar", make_stylebox(theme->get_icon("ScrollGrabberHl", "EditorIcons"), 5, 5, 5, 5, 2, 2, 2, 2));
|
||||
|
||||
theme->set_icon("increment", "HScrollBar", empty_icon);
|
||||
theme->set_icon("increment_highlight", "HScrollBar", empty_icon);
|
||||
theme->set_icon("decrement", "HScrollBar", empty_icon);
|
||||
theme->set_icon("decrement_highlight", "HScrollBar", empty_icon);
|
||||
|
||||
// VScrollBar
|
||||
theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon("ScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
|
||||
theme->set_stylebox("scroll_focus", "VScrollBar", make_stylebox(theme->get_icon("ScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
|
||||
theme->set_stylebox("grabber", "VScrollBar", make_stylebox(theme->get_icon("ScrollGrabber", "EditorIcons"), 6, 6, 6, 6, 2, 2, 2, 2));
|
||||
theme->set_stylebox("grabber_highlight", "VScrollBar", make_stylebox(theme->get_icon("ScrollGrabberHl", "EditorIcons"), 5, 5, 5, 5, 2, 2, 2, 2));
|
||||
|
||||
theme->set_icon("increment", "VScrollBar", empty_icon);
|
||||
theme->set_icon("increment_highlight", "VScrollBar", empty_icon);
|
||||
theme->set_icon("decrement", "VScrollBar", empty_icon);
|
||||
theme->set_icon("decrement_highlight", "VScrollBar", empty_icon);
|
||||
|
||||
// HSlider
|
||||
theme->set_stylebox("slider", "HSlider", make_stylebox(theme->get_icon("HsliderBg", "EditorIcons"), 4, 4, 4, 4));
|
||||
theme->set_icon("grabber", "HSlider", theme->get_icon("SliderGrabber", "EditorIcons"));
|
||||
theme->set_icon("grabber_highlight", "HSlider", theme->get_icon("SliderGrabberHl", "EditorIcons"));
|
||||
|
||||
// VSlider
|
||||
theme->set_stylebox("slider", "VSlider", make_stylebox(theme->get_icon("VsliderBg", "EditorIcons"), 4, 4, 4, 4));
|
||||
theme->set_icon("grabber", "VSlider", theme->get_icon("SliderGrabber", "EditorIcons"));
|
||||
theme->set_icon("grabber_highlight", "VSlider", theme->get_icon("SliderGrabberHl", "EditorIcons"));
|
||||
|
||||
// TooltipPanel
|
||||
Ref<StyleBoxFlat> style_tooltip = make_flat_stylebox(Color(1, 1, 1, 0.8), 8, 8, 8, 8);
|
||||
style_tooltip->set_border_size(2 * EDSCALE);
|
||||
style_tooltip->set_border_blend(false);
|
||||
style_tooltip->set_light_color(Color(1, 1, 1, 0.9));
|
||||
style_tooltip->set_dark_color(Color(1, 1, 1, 0.9));
|
||||
theme->set_stylebox("panel", "TooltipPanel", style_tooltip);
|
||||
|
||||
// PopupPanel
|
||||
Ref<StyleBoxFlat> style_dock_select = make_flat_stylebox(base_color);
|
||||
style_dock_select->set_light_color(light_color_1);
|
||||
style_dock_select->set_dark_color(light_color_1);
|
||||
style_dock_select = add_additional_border(style_dock_select, 2, 2, 2, 2);
|
||||
theme->set_stylebox("panel", "PopupPanel", style_dock_select);
|
||||
|
||||
// SpinBox
|
||||
theme->set_icon("updown", "SpinBox", theme->get_icon("SpinboxUpdown", "EditorIcons"));
|
||||
|
||||
// GraphNode
|
||||
Ref<StyleBoxFlat> graphsb = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
|
||||
graphsb->set_border_blend(false);
|
||||
graphsb->set_border_size(2);
|
||||
graphsb->set_light_color(Color(1, 1, 1, 0.6));
|
||||
graphsb->set_dark_color(Color(1, 1, 1, 0.6));
|
||||
graphsb = add_additional_border(graphsb, 0, -22, 0, 0);
|
||||
Ref<StyleBoxFlat> graphsbselected = make_flat_stylebox(Color(0, 0, 0, 0.4), 16, 24, 16, 5);
|
||||
graphsbselected->set_border_blend(false);
|
||||
graphsbselected->set_border_size(2);
|
||||
graphsbselected->set_light_color(Color(1, 1, 1, 0.9));
|
||||
graphsbselected->set_dark_color(Color(1, 1, 1, 0.9));
|
||||
graphsbselected = add_additional_border(graphsbselected, 0, -22, 0, 0);
|
||||
Ref<StyleBoxFlat> graphsbcomment = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
|
||||
graphsbcomment->set_border_blend(false);
|
||||
graphsbcomment->set_border_size(1);
|
||||
graphsbcomment->set_light_color(Color(1, 1, 1, 0.6));
|
||||
graphsbcomment->set_dark_color(Color(1, 1, 1, 0.6));
|
||||
graphsbcomment = add_additional_border(graphsbcomment, 0, -22, 0, 0);
|
||||
Ref<StyleBoxFlat> graphsbcommentselected = make_flat_stylebox(Color(0, 0, 0, 0.4), 16, 24, 16, 5);
|
||||
graphsbcommentselected->set_border_blend(false);
|
||||
graphsbcommentselected->set_border_size(1);
|
||||
graphsbcommentselected->set_light_color(Color(1, 1, 1, 0.9));
|
||||
graphsbcommentselected->set_dark_color(Color(1, 1, 1, 0.9));
|
||||
graphsbcommentselected = add_additional_border(graphsbcommentselected, 0, -22, 0, 0);
|
||||
theme->set_stylebox("frame", "GraphNode", graphsb);
|
||||
theme->set_stylebox("selectedframe", "GraphNode", graphsbselected);
|
||||
theme->set_stylebox("comment", "GraphNode", graphsbcomment);
|
||||
theme->set_stylebox("commentfocus", "GraphNode", graphsbcommentselected);
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
|
|
@ -1723,7 +1723,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
|
|||
tree->connect("item_rmb_selected", this, "_dir_rmb_pressed");
|
||||
|
||||
files = memnew(ItemList);
|
||||
files->add_style_override("bg", editor->get_gui_base()->get_stylebox("EditorBG", "EditorStyles"));
|
||||
files->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
files->set_select_mode(ItemList::SELECT_MULTI);
|
||||
files->set_drag_forwarding(this);
|
||||
|
|
BIN
editor/icons/2x/icon_2_d.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
editor/icons/2x/icon_3_d.png
Normal file
After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 382 B |
BIN
editor/icons/2x/icon_asset_lib.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
editor/icons/2x/icon_audio_bus_bypass.png
Normal file
After Width: | Height: | Size: 368 B |
BIN
editor/icons/2x/icon_audio_bus_layout.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
editor/icons/2x/icon_audio_bus_mute.png
Normal file
After Width: | Height: | Size: 527 B |
BIN
editor/icons/2x/icon_audio_bus_solo.png
Normal file
After Width: | Height: | Size: 479 B |
BIN
editor/icons/2x/icon_audio_effect_amplify.png
Normal file
After Width: | Height: | Size: 462 B |
BIN
editor/icons/2x/icon_audio_player.png
Normal file
After Width: | Height: | Size: 769 B |
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 422 B |
BIN
editor/icons/2x/icon_bus_vu_db.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
editor/icons/2x/icon_bus_vu_empty.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
editor/icons/2x/icon_bus_vu_frozen.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
editor/icons/2x/icon_bus_vu_full.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
editor/icons/2x/icon_checked.png
Normal file
After Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 358 B |
BIN
editor/icons/2x/icon_curve_texture.png
Normal file
After Width: | Height: | Size: 728 B |
BIN
editor/icons/2x/icon_debug.png
Normal file
After Width: | Height: | Size: 1,018 B |
BIN
editor/icons/2x/icon_dropdown.png
Normal file
After Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 346 B |
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 410 B |
BIN
editor/icons/2x/icon_g_d_native_script.png
Normal file
After Width: | Height: | Size: 698 B |
BIN
editor/icons/2x/icon_gradient_texture.png
Normal file
After Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 565 B |
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 575 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 549 B |
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 560 B |
BIN
editor/icons/2x/icon_hslider_bg.png
Normal file
After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 376 B After Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 523 B After Width: | Height: | Size: 228 B |
BIN
editor/icons/2x/icon_mini_basis.png
Normal file
After Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 472 B |
BIN
editor/icons/2x/icon_mini_transform2D.png
Normal file
After Width: | Height: | Size: 602 B |
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 242 B |
BIN
editor/icons/2x/icon_option_arrow.png
Normal file
After Width: | Height: | Size: 360 B |
BIN
editor/icons/2x/icon_particles_material.png
Normal file
After Width: | Height: | Size: 657 B |
BIN
editor/icons/2x/icon_play_button_group.png
Normal file
After Width: | Height: | Size: 942 B |
BIN
editor/icons/2x/icon_search.png
Normal file
After Width: | Height: | Size: 762 B |
BIN
editor/icons/2x/icon_slider_grabber.png
Normal file
After Width: | Height: | Size: 686 B |
BIN
editor/icons/2x/icon_slider_grabber_hl.png
Normal file
After Width: | Height: | Size: 672 B |
BIN
editor/icons/2x/icon_spatial_material.png
Normal file
After Width: | Height: | Size: 704 B |
BIN
editor/icons/2x/icon_spinbox_updown.png
Normal file
After Width: | Height: | Size: 562 B |
BIN
editor/icons/2x/icon_stream_texture.png
Normal file
After Width: | Height: | Size: 247 B |
BIN
editor/icons/2x/icon_tab_menu.png
Normal file
After Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 366 B |
BIN
editor/icons/2x/icon_tree_arrow_down.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
editor/icons/2x/icon_tree_arrow_right.png
Normal file
After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 320 B |
BIN
editor/icons/2x/icon_unchecked.png
Normal file
After Width: | Height: | Size: 404 B |
BIN
editor/icons/2x/icon_vslider_bg.png
Normal file
After Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 718 B |
BIN
editor/icons/icon_2_d.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
editor/icons/icon_3_d.png
Normal file
After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 269 B |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 259 B |
BIN
editor/icons/icon_asset_lib.png
Normal file
After Width: | Height: | Size: 224 B |
BIN
editor/icons/icon_audio_bus_bypass.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
editor/icons/icon_audio_bus_layout.png
Normal file
After Width: | Height: | Size: 319 B |
BIN
editor/icons/icon_audio_bus_mute.png
Normal file
After Width: | Height: | Size: 292 B |
BIN
editor/icons/icon_audio_bus_solo.png
Normal file
After Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 300 B |
BIN
editor/icons/icon_audio_player.png
Normal file
After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 938 B |
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 868 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 894 B |