Merge pull request #57725 from jmb462/missing-sname-theme-setters
This commit is contained in:
commit
b024602660
90 changed files with 1648 additions and 1648 deletions
|
|
@ -530,9 +530,9 @@ void AnimationNodeBlendSpace1DEditor::_open_editor() {
|
|||
|
||||
void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
|
||||
error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
tool_blend->set_icon(get_theme_icon(SNAME("EditPivot"), SNAME("EditorIcons")));
|
||||
tool_select->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons")));
|
||||
tool_create->set_icon(get_theme_icon(SNAME("EditKey"), SNAME("EditorIcons")));
|
||||
|
|
|
|||
|
|
@ -730,9 +730,9 @@ void AnimationNodeBlendSpace2DEditor::_edit_point_pos(double) {
|
|||
|
||||
void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
|
||||
error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
tool_blend->set_icon(get_theme_icon(SNAME("EditPivot"), SNAME("EditorIcons")));
|
||||
tool_select->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons")));
|
||||
tool_create->set_icon(get_theme_icon(SNAME("EditKey"), SNAME("EditorIcons")));
|
||||
|
|
|
|||
|
|
@ -243,10 +243,10 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
|
|||
mono_color.a = 0.85;
|
||||
c = mono_color;
|
||||
|
||||
node->add_theme_color_override("title_color", c);
|
||||
node->add_theme_color_override(SNAME("title_color"), c);
|
||||
c.a = 0.7;
|
||||
node->add_theme_color_override("close_color", c);
|
||||
node->add_theme_color_override("resizer_color", c);
|
||||
node->add_theme_color_override(SNAME("close_color"), c);
|
||||
node->add_theme_color_override(SNAME("resizer_color"), c);
|
||||
}
|
||||
|
||||
List<AnimationNodeBlendTree::NodeConnection> connections;
|
||||
|
|
@ -739,8 +739,8 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
|
|||
}
|
||||
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
|
||||
error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
error_panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
|
||||
if (p_what == NOTIFICATION_THEME_CHANGED && is_visible_in_tree()) {
|
||||
_update_graph();
|
||||
|
|
|
|||
|
|
@ -101,10 +101,10 @@ void AnimationPlayerEditor::_notification(int p_what) {
|
|||
|
||||
get_tree()->connect("node_removed", callable_mp(this, &AnimationPlayerEditor::_node_removed));
|
||||
|
||||
add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||
add_theme_style_override(SNAME("panel"), editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||
} break;
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||
add_theme_style_override(SNAME("panel"), editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||
} break;
|
||||
case NOTIFICATION_TRANSLATION_CHANGED:
|
||||
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
||||
|
|
@ -137,8 +137,8 @@ void AnimationPlayerEditor::_notification(int p_what) {
|
|||
|
||||
pin->set_icon(get_theme_icon(SNAME("Pin"), SNAME("EditorIcons")));
|
||||
|
||||
tool_anim->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("Button")));
|
||||
track_editor->get_edit_menu()->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("Button")));
|
||||
tool_anim->add_theme_style_override(SNAME("normal"), get_theme_stylebox(SNAME("normal"), SNAME("Button")));
|
||||
track_editor->get_edit_menu()->add_theme_style_override(SNAME("normal"), get_theme_stylebox(SNAME("normal"), SNAME("Button")));
|
||||
|
||||
#define ITEM_ICON(m_item, m_icon) tool_anim->get_popup()->set_item_icon(tool_anim->get_popup()->get_item_index(m_item), get_theme_icon(SNAME(m_icon), SNAME("EditorIcons")))
|
||||
|
||||
|
|
|
|||
|
|
@ -883,9 +883,9 @@ void AnimationNodeStateMachineEditor::_update_graph() {
|
|||
|
||||
void AnimationNodeStateMachineEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_LAYOUT_DIRECTION_CHANGED || p_what == NOTIFICATION_TRANSLATION_CHANGED) {
|
||||
error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
|
||||
tool_select->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons")));
|
||||
tool_create->set_icon(get_theme_icon(SNAME("ToolAddNode"), SNAME("EditorIcons")));
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ void EditorAssetLibraryItem::set_image(int p_type, int p_index, const Ref<Textur
|
|||
void EditorAssetLibraryItem::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_ENTER_TREE) {
|
||||
icon->set_normal_texture(get_theme_icon(SNAME("ProjectIconLoading"), SNAME("EditorIcons")));
|
||||
category->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
|
||||
author->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
|
||||
price->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
|
||||
category->add_theme_color_override(SNAME("font_color"), Color(0.5, 0.5, 0.5));
|
||||
author->add_theme_color_override(SNAME("font_color"), Color(0.5, 0.5, 0.5));
|
||||
price->add_theme_color_override(SNAME("font_color"), Color(0.5, 0.5, 0.5));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -100,11 +100,11 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
|
|||
border->set_default_margin(SIDE_RIGHT, 5 * EDSCALE);
|
||||
border->set_default_margin(SIDE_BOTTOM, 5 * EDSCALE);
|
||||
border->set_default_margin(SIDE_TOP, 5 * EDSCALE);
|
||||
add_theme_style_override("panel", border);
|
||||
add_theme_style_override(SNAME("panel"), border);
|
||||
|
||||
HBoxContainer *hb = memnew(HBoxContainer);
|
||||
// Add some spacing to visually separate the icon from the asset details.
|
||||
hb->add_theme_constant_override("separation", 15 * EDSCALE);
|
||||
hb->add_theme_constant_override(SNAME("separation"), 15 * EDSCALE);
|
||||
add_child(hb);
|
||||
|
||||
icon = memnew(TextureButton);
|
||||
|
|
@ -195,7 +195,7 @@ void EditorAssetLibraryItemDescription::_notification(int p_what) {
|
|||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
previews_bg->add_theme_style_override("panel", previews->get_theme_stylebox(SNAME("normal"), SNAME("TextEdit")));
|
||||
previews_bg->add_theme_style_override(SNAME("panel"), previews->get_theme_stylebox(SNAME("normal"), SNAME("TextEdit")));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
@ -269,7 +269,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
|
|||
add_child(hbox);
|
||||
VBoxContainer *desc_vbox = memnew(VBoxContainer);
|
||||
hbox->add_child(desc_vbox);
|
||||
hbox->add_theme_constant_override("separation", 15 * EDSCALE);
|
||||
hbox->add_theme_constant_override(SNAME("separation"), 15 * EDSCALE);
|
||||
|
||||
item = memnew(EditorAssetLibraryItem);
|
||||
|
||||
|
|
@ -280,11 +280,11 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
|
|||
desc_vbox->add_child(description);
|
||||
description->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
description->connect("meta_clicked", callable_mp(this, &EditorAssetLibraryItemDescription::_link_click));
|
||||
description->add_theme_constant_override("line_separation", Math::round(5 * EDSCALE));
|
||||
description->add_theme_constant_override(SNAME("line_separation"), Math::round(5 * EDSCALE));
|
||||
|
||||
VBoxContainer *previews_vbox = memnew(VBoxContainer);
|
||||
hbox->add_child(previews_vbox);
|
||||
previews_vbox->add_theme_constant_override("separation", 15 * EDSCALE);
|
||||
previews_vbox->add_theme_constant_override(SNAME("separation"), 15 * EDSCALE);
|
||||
previews_vbox->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
preview = memnew(TextureRect);
|
||||
|
|
@ -400,8 +400,8 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
|
|||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("AssetLib")));
|
||||
status->add_theme_color_override("font_color", get_theme_color(SNAME("status_color"), SNAME("AssetLib")));
|
||||
panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("panel"), SNAME("AssetLib")));
|
||||
status->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("status_color"), SNAME("AssetLib")));
|
||||
dismiss_button->set_normal_texture(get_theme_icon(SNAME("dismiss"), SNAME("AssetLib")));
|
||||
} break;
|
||||
case NOTIFICATION_PROCESS: {
|
||||
|
|
@ -578,9 +578,9 @@ void EditorAssetLibrary::_notification(int p_what) {
|
|||
case NOTIFICATION_THEME_CHANGED: {
|
||||
error_tr->set_texture(get_theme_icon(SNAME("Error"), SNAME("EditorIcons")));
|
||||
filter->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
|
||||
library_scroll_bg->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
downloads_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override("color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
library_scroll_bg->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
downloads_scroll->add_theme_style_override(SNAME("bg"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
error_label->add_theme_color_override(SNAME("color"), get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
} break;
|
||||
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||
if (is_visible()) {
|
||||
|
|
@ -984,7 +984,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
|||
}
|
||||
|
||||
hbc->add_spacer();
|
||||
hbc->add_theme_constant_override("separation", 5 * EDSCALE);
|
||||
hbc->add_theme_constant_override(SNAME("separation"), 5 * EDSCALE);
|
||||
|
||||
Button *first = memnew(Button);
|
||||
first->set_text(TTR("First"));
|
||||
|
|
@ -1191,8 +1191,8 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
|
|||
|
||||
asset_items = memnew(GridContainer);
|
||||
asset_items->set_columns(2);
|
||||
asset_items->add_theme_constant_override("hseparation", 10 * EDSCALE);
|
||||
asset_items->add_theme_constant_override("vseparation", 10 * EDSCALE);
|
||||
asset_items->add_theme_constant_override(SNAME("hseparation"), 10 * EDSCALE);
|
||||
asset_items->add_theme_constant_override(SNAME("vseparation"), 10 * EDSCALE);
|
||||
|
||||
library_vb->add_child(asset_items);
|
||||
|
||||
|
|
@ -1374,7 +1374,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
HBoxContainer *search_hb = memnew(HBoxContainer);
|
||||
|
||||
library_main->add_child(search_hb);
|
||||
library_main->add_theme_constant_override("separation", 10 * EDSCALE);
|
||||
library_main->add_theme_constant_override(SNAME("separation"), 10 * EDSCALE);
|
||||
|
||||
filter = memnew(LineEdit);
|
||||
if (templates_only) {
|
||||
|
|
@ -1482,7 +1482,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
|
||||
PanelContainer *library_vb_border = memnew(PanelContainer);
|
||||
library_scroll->add_child(library_vb_border);
|
||||
library_vb_border->add_theme_style_override("panel", border2);
|
||||
library_vb_border->add_theme_style_override(SNAME("panel"), border2);
|
||||
library_vb_border->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
library_vb = memnew(VBoxContainer);
|
||||
|
|
@ -1504,8 +1504,8 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
|
||||
asset_items = memnew(GridContainer);
|
||||
asset_items->set_columns(2);
|
||||
asset_items->add_theme_constant_override("hseparation", 10 * EDSCALE);
|
||||
asset_items->add_theme_constant_override("vseparation", 10 * EDSCALE);
|
||||
asset_items->add_theme_constant_override(SNAME("hseparation"), 10 * EDSCALE);
|
||||
asset_items->add_theme_constant_override(SNAME("vseparation"), 10 * EDSCALE);
|
||||
|
||||
library_vb->add_child(asset_items);
|
||||
|
||||
|
|
@ -1519,7 +1519,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
|
|||
|
||||
last_queue_id = 0;
|
||||
|
||||
library_vb->add_theme_constant_override("separation", 20 * EDSCALE);
|
||||
library_vb->add_theme_constant_override(SNAME("separation"), 20 * EDSCALE);
|
||||
|
||||
error_hb = memnew(HBoxContainer);
|
||||
library_main->add_child(error_hb);
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ AudioStreamEditor::AudioStreamEditor() {
|
|||
_preview->add_child(_indicator);
|
||||
|
||||
HBoxContainer *hbox = memnew(HBoxContainer);
|
||||
hbox->add_theme_constant_override("separation", 0);
|
||||
hbox->add_theme_constant_override(SNAME("separation"), 0);
|
||||
vbox->add_child(hbox);
|
||||
|
||||
_play_button = memnew(Button);
|
||||
|
|
@ -243,14 +243,14 @@ AudioStreamEditor::AudioStreamEditor() {
|
|||
_current_label = memnew(Label);
|
||||
_current_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||
_current_label->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
_current_label->add_theme_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
|
||||
_current_label->add_theme_font_size_override("font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
|
||||
_current_label->add_theme_font_override(SNAME("font"), EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
|
||||
_current_label->add_theme_font_size_override(SNAME("font_size"), EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
|
||||
_current_label->set_modulate(Color(1, 1, 1, 0.5));
|
||||
hbox->add_child(_current_label);
|
||||
|
||||
_duration_label = memnew(Label);
|
||||
_duration_label->add_theme_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
|
||||
_duration_label->add_theme_font_size_override("font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
|
||||
_duration_label->add_theme_font_override(SNAME("font"), EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
|
||||
_duration_label->add_theme_font_size_override(SNAME("font_size"), EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
|
||||
hbox->add_child(_duration_label);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3847,7 +3847,7 @@ void CanvasItemEditor::_notification(int p_what) {
|
|||
// the icon will be dark, so we need to lighten it before blending it
|
||||
// with the red color.
|
||||
const Color key_auto_color = EditorSettings::get_singleton()->is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25);
|
||||
key_auto_insert_button->add_theme_color_override("icon_pressed_color", key_auto_color.lerp(Color(1, 0, 0), 0.55));
|
||||
key_auto_insert_button->add_theme_color_override(SNAME("icon_pressed_color"), key_auto_color.lerp(Color(1, 0, 0), 0.55));
|
||||
animation_menu->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
|
||||
|
||||
_update_context_menu_stylebox();
|
||||
|
|
@ -3967,7 +3967,7 @@ void CanvasItemEditor::_update_context_menu_stylebox() {
|
|||
context_menu_stylebox->set_border_color(accent_color);
|
||||
context_menu_stylebox->set_border_width(SIDE_BOTTOM, Math::round(2 * EDSCALE));
|
||||
context_menu_stylebox->set_default_margin(SIDE_BOTTOM, 0);
|
||||
context_menu_container->add_theme_style_override("panel", context_menu_stylebox);
|
||||
context_menu_container->add_theme_style_override(SNAME("panel"), context_menu_stylebox);
|
||||
}
|
||||
|
||||
void CanvasItemEditor::_update_scrollbars() {
|
||||
|
|
@ -6073,7 +6073,7 @@ void CanvasItemEditorViewport::_notification(int p_what) {
|
|||
check->set_icon(get_theme_icon(check->get_text(), SNAME("EditorIcons")));
|
||||
}
|
||||
|
||||
label->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor")));
|
||||
label->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("warning_color"), SNAME("Editor")));
|
||||
}
|
||||
|
||||
switch (p_what) {
|
||||
|
|
@ -6141,16 +6141,16 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
|
|||
}
|
||||
|
||||
label = memnew(Label);
|
||||
label->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 1));
|
||||
label->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE);
|
||||
label->add_theme_color_override(SNAME("font_shadow_color"), Color(0, 0, 0, 1));
|
||||
label->add_theme_constant_override(SNAME("shadow_outline_size"), 1 * EDSCALE);
|
||||
label->hide();
|
||||
canvas_item_editor->get_controls_container()->add_child(label);
|
||||
|
||||
label_desc = memnew(Label);
|
||||
label_desc->add_theme_color_override("font_color", Color(0.6f, 0.6f, 0.6f, 1));
|
||||
label_desc->add_theme_color_override("font_shadow_color", Color(0.2f, 0.2f, 0.2f, 1));
|
||||
label_desc->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE);
|
||||
label_desc->add_theme_constant_override("line_spacing", 0);
|
||||
label_desc->add_theme_color_override(SNAME("font_color"), Color(0.6f, 0.6f, 0.6f, 1));
|
||||
label_desc->add_theme_color_override(SNAME("font_shadow_color"), Color(0.2f, 0.2f, 0.2f, 1));
|
||||
label_desc->add_theme_constant_override(SNAME("shadow_outline_size"), 1 * EDSCALE);
|
||||
label_desc->add_theme_constant_override(SNAME("line_spacing"), 0);
|
||||
label_desc->hide();
|
||||
canvas_item_editor->get_controls_container()->add_child(label_desc);
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(EditorNode *p_editor, MenuButton *p_d
|
|||
EditorDebuggerNode *debugger = memnew(EditorDebuggerNode);
|
||||
Button *db = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Debugger"), debugger);
|
||||
// Add separation for the warning/error icon that is displayed later.
|
||||
db->add_theme_constant_override("hseparation", 6 * EDSCALE);
|
||||
db->add_theme_constant_override(SNAME("hseparation"), 6 * EDSCALE);
|
||||
debugger->set_tool_button(db);
|
||||
|
||||
// Main editor debug menu.
|
||||
|
|
|
|||
|
|
@ -76,10 +76,10 @@ void InputEventConfigContainer::set_event(const Ref<InputEvent> &p_event) {
|
|||
|
||||
InputEventConfigContainer::InputEventConfigContainer() {
|
||||
MarginContainer *mc = memnew(MarginContainer);
|
||||
mc->add_theme_constant_override("margin_left", 10);
|
||||
mc->add_theme_constant_override("margin_right", 10);
|
||||
mc->add_theme_constant_override("margin_top", 10);
|
||||
mc->add_theme_constant_override("margin_bottom", 10);
|
||||
mc->add_theme_constant_override(SNAME("margin_left"), 10);
|
||||
mc->add_theme_constant_override(SNAME("margin_right"), 10);
|
||||
mc->add_theme_constant_override(SNAME("margin_top"), 10);
|
||||
mc->add_theme_constant_override(SNAME("margin_bottom"), 10);
|
||||
add_child(mc);
|
||||
|
||||
HBoxContainer *hb = memnew(HBoxContainer);
|
||||
|
|
|
|||
|
|
@ -2946,28 +2946,28 @@ void Node3DEditorViewport::_notification(int p_what) {
|
|||
view_menu->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
|
||||
preview_camera->set_icon(get_theme_icon(SNAME("Camera3D"), SNAME("EditorIcons")));
|
||||
|
||||
view_menu->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override("hover", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override("pressed", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override("focus", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override("disabled", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override(SNAME("hover"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override(SNAME("pressed"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override(SNAME("focus"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
view_menu->add_theme_style_override(SNAME("disabled"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
|
||||
preview_camera->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override("hover", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override("pressed", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override("focus", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override("disabled", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override(SNAME("hover"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override(SNAME("pressed"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override(SNAME("focus"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
preview_camera->add_theme_style_override(SNAME("disabled"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
|
||||
frame_time_gradient->set_color(0, get_theme_color(SNAME("success_color"), SNAME("Editor")));
|
||||
frame_time_gradient->set_color(1, get_theme_color(SNAME("warning_color"), SNAME("Editor")));
|
||||
frame_time_gradient->set_color(2, get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
|
||||
info_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
cpu_time_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
gpu_time_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
fps_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
cinema_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
locked_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
info_label->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
cpu_time_label->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
gpu_time_label->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
fps_label->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
cinema_label->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
locked_label->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4512,7 +4512,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
|
|||
zoom_limit_label->set_offset(Side::SIDE_TOP, -28 * EDSCALE);
|
||||
zoom_limit_label->set_text(TTR("To zoom further, change the camera's clipping planes (View -> Settings...)"));
|
||||
zoom_limit_label->set_name("ZoomLimitMessageLabel");
|
||||
zoom_limit_label->add_theme_color_override("font_color", Color(1, 1, 1, 1));
|
||||
zoom_limit_label->add_theme_color_override(SNAME("font_color"), Color(1, 1, 1, 1));
|
||||
zoom_limit_label->hide();
|
||||
surface->add_child(zoom_limit_label);
|
||||
|
||||
|
|
@ -4526,7 +4526,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
|
|||
// Make sure frame time labels don't touch the viewport's edge.
|
||||
top_right_vbox->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
|
||||
// Prevent visible spacing between frame time labels.
|
||||
top_right_vbox->add_theme_constant_override("separation", 0);
|
||||
top_right_vbox->add_theme_constant_override(SNAME("separation"), 0);
|
||||
|
||||
rotation_control = memnew(ViewportRotationControl);
|
||||
rotation_control->set_custom_minimum_size(Size2(80, 80) * EDSCALE);
|
||||
|
|
@ -6190,7 +6190,7 @@ void Node3DEditor::_update_context_menu_stylebox() {
|
|||
context_menu_stylebox->set_border_color(accent_color);
|
||||
context_menu_stylebox->set_border_width(SIDE_BOTTOM, Math::round(2 * EDSCALE));
|
||||
context_menu_stylebox->set_default_margin(SIDE_BOTTOM, 0);
|
||||
context_menu_container->add_theme_style_override("panel", context_menu_stylebox);
|
||||
context_menu_container->add_theme_style_override(SNAME("panel"), context_menu_stylebox);
|
||||
}
|
||||
|
||||
void Node3DEditor::_update_gizmos_menu() {
|
||||
|
|
@ -6777,8 +6777,8 @@ void Node3DEditor::_update_theme() {
|
|||
environ_button->set_icon(get_theme_icon(SNAME("WorldEnvironment"), SNAME("EditorIcons")));
|
||||
sun_environ_settings->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
|
||||
|
||||
sun_title->add_theme_font_override("font", get_theme_font(SNAME("title_font"), SNAME("Window")));
|
||||
environ_title->add_theme_font_override("font", get_theme_font(SNAME("title_font"), SNAME("Window")));
|
||||
sun_title->add_theme_font_override(SNAME("font"), get_theme_font(SNAME("title_font"), SNAME("Window")));
|
||||
environ_title->add_theme_font_override(SNAME("font"), get_theme_font(SNAME("title_font"), SNAME("Window")));
|
||||
}
|
||||
|
||||
void Node3DEditor::_notification(int p_what) {
|
||||
|
|
@ -6815,8 +6815,8 @@ void Node3DEditor::_notification(int p_what) {
|
|||
_update_theme();
|
||||
_update_gizmos_menu_theme();
|
||||
_update_context_menu_stylebox();
|
||||
sun_title->add_theme_font_override("font", get_theme_font(SNAME("title_font"), SNAME("Window")));
|
||||
environ_title->add_theme_font_override("font", get_theme_font(SNAME("title_font"), SNAME("Window")));
|
||||
sun_title->add_theme_font_override(SNAME("font"), get_theme_font(SNAME("title_font"), SNAME("Window")));
|
||||
environ_title->add_theme_font_override(SNAME("font"), get_theme_font(SNAME("title_font"), SNAME("Window")));
|
||||
} break;
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
// Update grid color by rebuilding grid.
|
||||
|
|
@ -7806,7 +7806,7 @@ void fragment() {
|
|||
sun_angle_azimuth->connect("value_changed", callable_mp(this, &Node3DEditor::_sun_direction_angle_set).unbind(1));
|
||||
sun_angle_azimuth_vbox->add_child(sun_angle_azimuth);
|
||||
sun_angle_hbox->add_child(sun_angle_azimuth_vbox);
|
||||
sun_angle_hbox->add_theme_constant_override("separation", 10);
|
||||
sun_angle_hbox->add_theme_constant_override(SNAME("separation"), 10);
|
||||
sun_vb->add_child(sun_angle_hbox);
|
||||
|
||||
sun_color = memnew(ColorPickerButton);
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ void Polygon2DEditor::_notification(int p_what) {
|
|||
[[fallthrough]];
|
||||
}
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
uv_edit_draw->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
bone_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
uv_edit_draw->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
bone_scroll->add_theme_style_override(SNAME("bg"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
} break;
|
||||
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||
if (!is_visible()) {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ void ReplicationEditor::_bind_methods() {
|
|||
|
||||
void ReplicationEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||
add_theme_style_override(SNAME("panel"), editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
|
||||
update_keying();
|
||||
}
|
||||
|
|
@ -257,10 +257,10 @@ void ReplicationEditor::edit(MultiplayerSynchronizer *p_sync) {
|
|||
}
|
||||
|
||||
Ref<Texture2D> ReplicationEditor::_get_class_icon(const Node *p_node) {
|
||||
if (!p_node || !has_theme_icon(p_node->get_class(), "EditorIcons")) {
|
||||
return get_theme_icon("ImportFail", "EditorIcons");
|
||||
if (!p_node || !has_theme_icon(p_node->get_class(), SNAME("EditorIcons"))) {
|
||||
return get_theme_icon(SNAME("ImportFail"), SNAME("EditorIcons"));
|
||||
}
|
||||
return get_theme_icon(p_node->get_class(), "EditorIcons");
|
||||
return get_theme_icon(p_node->get_class(), SNAME("EditorIcons"));
|
||||
}
|
||||
|
||||
void ReplicationEditor::_add_property(const NodePath &p_property, bool p_spawn, bool p_sync) {
|
||||
|
|
@ -285,7 +285,7 @@ void ReplicationEditor::_add_property(const NodePath &p_property, bool p_spawn,
|
|||
icon = _get_class_icon(node);
|
||||
}
|
||||
item->set_icon(0, icon);
|
||||
item->add_button(3, get_theme_icon("Remove", "EditorIcons"));
|
||||
item->add_button(3, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
|
||||
item->set_text_alignment(1, HORIZONTAL_ALIGNMENT_CENTER);
|
||||
item->set_cell_mode(1, TreeItem::CELL_MODE_CHECK);
|
||||
item->set_checked(1, p_spawn);
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ void ResourcePreloaderEditor::_bind_methods() {
|
|||
}
|
||||
|
||||
ResourcePreloaderEditor::ResourcePreloaderEditor() {
|
||||
//add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("panel","Panel"));
|
||||
//add_style_override(SNAME("panel"), EditorNode::get_singleton()->get_gui_base()->get_stylebox("panel","Panel"));
|
||||
|
||||
VBoxContainer *vbc = memnew(VBoxContainer);
|
||||
add_child(vbc);
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
|
|||
search_options->connect("item_activated", callable_mp(this, &ScriptEditorQuickOpen::_confirmed));
|
||||
search_options->set_hide_root(true);
|
||||
search_options->set_hide_folding(true);
|
||||
search_options->add_theme_constant_override("draw_guides", 1);
|
||||
search_options->add_theme_constant_override(SNAME("draw_guides"), 1);
|
||||
}
|
||||
|
||||
/////////////////////////////////
|
||||
|
|
@ -1630,7 +1630,7 @@ void ScriptEditor::_notification(int p_what) {
|
|||
filter_scripts->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
|
||||
filter_methods->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
|
||||
|
||||
filename->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
|
||||
filename->add_theme_style_override(SNAME("normal"), editor->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
|
||||
|
||||
recent_scripts->set_as_minsize();
|
||||
|
||||
|
|
@ -3693,7 +3693,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||
filename = memnew(Label);
|
||||
filename->set_clip_text(true);
|
||||
filename->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
filename->add_theme_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
|
||||
filename->add_theme_style_override(SNAME("normal"), EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
|
||||
buttons_hbox->add_child(filename);
|
||||
|
||||
members_overview_alphabeta_sort_button = memnew(Button);
|
||||
|
|
@ -3948,8 +3948,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||
|
||||
ScriptServer::edit_request_func = _open_script_request;
|
||||
|
||||
add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles")));
|
||||
tab_container->add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditor"), SNAME("EditorStyles")));
|
||||
add_theme_style_override(SNAME("panel"), editor->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles")));
|
||||
tab_container->add_theme_style_override(SNAME("panel"), editor->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditor"), SNAME("EditorStyles")));
|
||||
}
|
||||
|
||||
ScriptEditor::~ScriptEditor() {
|
||||
|
|
|
|||
|
|
@ -1848,7 +1848,7 @@ void ScriptTextEditor::_enable_code_editor() {
|
|||
|
||||
ScriptTextEditor::ScriptTextEditor() {
|
||||
code_editor = memnew(CodeTextEditor);
|
||||
code_editor->add_theme_constant_override("separation", 2);
|
||||
code_editor->add_theme_constant_override(SNAME("separation"), 2);
|
||||
code_editor->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
|
||||
code_editor->set_code_complete_func(_code_complete_scripts, this);
|
||||
code_editor->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
|
|
|||
|
|
@ -189,8 +189,8 @@ void ShaderTextEditor::_load_theme_settings() {
|
|||
|
||||
if (warnings_panel) {
|
||||
// Warnings panel
|
||||
warnings_panel->add_theme_font_override("normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("main"), SNAME("EditorFonts")));
|
||||
warnings_panel->add_theme_font_size_override("normal_font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts")));
|
||||
warnings_panel->add_theme_font_override(SNAME("normal_font"), EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("main"), SNAME("EditorFonts")));
|
||||
warnings_panel->add_theme_font_size_override(SNAME("normal_font_size"), EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -443,7 +443,7 @@ void ShaderEditor::_notification(int p_what) {
|
|||
void ShaderEditor::_editor_settings_changed() {
|
||||
shader_editor->update_editor_settings();
|
||||
|
||||
shader_editor->get_text_editor()->add_theme_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/appearance/whitespace/line_spacing"));
|
||||
shader_editor->get_text_editor()->add_theme_constant_override(SNAME("line_spacing"), EditorSettings::get_singleton()->get("text_editor/appearance/whitespace/line_spacing"));
|
||||
shader_editor->get_text_editor()->set_draw_breakpoints_gutter(false);
|
||||
shader_editor->get_text_editor()->set_draw_executing_lines_gutter(false);
|
||||
}
|
||||
|
|
@ -701,7 +701,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
|
|||
|
||||
shader_editor = memnew(ShaderTextEditor);
|
||||
shader_editor->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
shader_editor->add_theme_constant_override("separation", 0);
|
||||
shader_editor->add_theme_constant_override(SNAME("separation"), 0);
|
||||
shader_editor->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
|
||||
|
||||
shader_editor->connect("show_warnings_panel", callable_mp(this, &ShaderEditor::_show_warnings_panel));
|
||||
|
|
@ -789,7 +789,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
|
|||
hbc->add_child(edit_menu);
|
||||
hbc->add_child(goto_menu);
|
||||
hbc->add_child(help_menu);
|
||||
hbc->add_theme_style_override("panel", p_node->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles")));
|
||||
hbc->add_theme_style_override(SNAME("panel"), p_node->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles")));
|
||||
|
||||
VSplitContainer *editor_box = memnew(VSplitContainer);
|
||||
main_container->add_child(editor_box);
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ void Skeleton3DEditor::update_editors() {
|
|||
|
||||
void Skeleton3DEditor::create_editors() {
|
||||
set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
add_theme_constant_override("separation", 0);
|
||||
add_theme_constant_override(SNAME("separation"), 0);
|
||||
|
||||
set_focus_mode(FOCUS_ALL);
|
||||
|
||||
|
|
|
|||
|
|
@ -328,10 +328,10 @@ void SpriteFramesEditor::_notification(int p_what) {
|
|||
[[fallthrough]];
|
||||
}
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
split_sheet_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
split_sheet_scroll->add_theme_style_override(SNAME("bg"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
} break;
|
||||
case NOTIFICATION_READY: {
|
||||
add_theme_constant_override("autohide", 1); // Fixes the dragger always showing up.
|
||||
add_theme_constant_override(SNAME("autohide"), 1); // Fixes the dragger always showing up.
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1247,8 +1247,8 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_panel->add_child(split_sheet_zoom_margin);
|
||||
split_sheet_zoom_margin->set_h_size_flags(0);
|
||||
split_sheet_zoom_margin->set_v_size_flags(0);
|
||||
split_sheet_zoom_margin->add_theme_constant_override("margin_top", 5);
|
||||
split_sheet_zoom_margin->add_theme_constant_override("margin_left", 5);
|
||||
split_sheet_zoom_margin->add_theme_constant_override(SNAME("margin_top"), 5);
|
||||
split_sheet_zoom_margin->add_theme_constant_override(SNAME("margin_left"), 5);
|
||||
HBoxContainer *split_sheet_zoom_hb = memnew(HBoxContainer);
|
||||
split_sheet_zoom_margin->add_child(split_sheet_zoom_hb);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void StyleBoxPreview::edit(const Ref<StyleBox> &p_stylebox) {
|
|||
}
|
||||
stylebox = p_stylebox;
|
||||
if (p_stylebox.is_valid()) {
|
||||
preview->add_theme_style_override("panel", stylebox);
|
||||
preview->add_theme_style_override(SNAME("panel"), stylebox);
|
||||
stylebox->connect("changed", callable_mp(this, &StyleBoxPreview::_sb_changed));
|
||||
}
|
||||
_sb_changed();
|
||||
|
|
|
|||
|
|
@ -220,9 +220,9 @@ void TextControlEditor::_update_control() {
|
|||
}
|
||||
|
||||
int current_font_size = edited_control->get_theme_font_size(edited_font_size);
|
||||
int current_outline_size = edited_control->get_theme_constant("outline_size");
|
||||
int current_outline_size = edited_control->get_theme_constant(SNAME("outline_size"));
|
||||
Color current_font_color = edited_control->get_theme_color(edited_color);
|
||||
Color current_outline_color = edited_control->get_theme_color("font_outline_color");
|
||||
Color current_outline_color = edited_control->get_theme_color(SNAME("font_outline_color"));
|
||||
if (i > 0) {
|
||||
same_font_size = same_font_size && (font_size == current_font_size);
|
||||
same_outline_size = same_outline_size && (outline_size == current_outline_size);
|
||||
|
|
@ -392,8 +392,8 @@ void TextControlEditor::_outline_size_selected(double p_size) {
|
|||
Control *edited_control = edited_controls[i];
|
||||
|
||||
ur->add_do_method(edited_control, "add_theme_constant_override", "outline_size", p_size);
|
||||
if (edited_control->has_theme_constant_override("outline_size")) {
|
||||
ur->add_undo_method(edited_control, "add_theme_constant_override", "outline_size", edited_control->get_theme_constant("outline_size"));
|
||||
if (edited_control->has_theme_constant_override(SNAME("outline_size"))) {
|
||||
ur->add_undo_method(edited_control, "add_theme_constant_override", "outline_size", edited_control->get_theme_constant(SNAME("outline_size")));
|
||||
} else {
|
||||
ur->add_undo_method(edited_control, "remove_theme_constant_override", "outline_size");
|
||||
}
|
||||
|
|
@ -451,8 +451,8 @@ void TextControlEditor::_outline_color_changed(const Color &p_color) {
|
|||
Control *edited_control = edited_controls[i];
|
||||
|
||||
ur->add_do_method(edited_control, "add_theme_color_override", "font_outline_color", p_color);
|
||||
if (edited_control->has_theme_color_override("font_outline_color")) {
|
||||
ur->add_undo_method(edited_control, "add_theme_color_override", "font_outline_color", edited_control->get_theme_color("font_outline_color"));
|
||||
if (edited_control->has_theme_color_override(SNAME("font_outline_color"))) {
|
||||
ur->add_undo_method(edited_control, "add_theme_color_override", "font_outline_color", edited_control->get_theme_color(SNAME("font_outline_color")));
|
||||
} else {
|
||||
ur->add_undo_method(edited_control, "remove_theme_color_override", "font_outline_color");
|
||||
}
|
||||
|
|
@ -510,13 +510,13 @@ void TextControlEditor::_clear_formatting() {
|
|||
}
|
||||
|
||||
ur->add_do_method(edited_control, "remove_theme_color_override", "font_outline_color");
|
||||
if (edited_control->has_theme_color_override("font_outline_color")) {
|
||||
ur->add_undo_method(edited_control, "add_theme_color_override", "font_outline_color", edited_control->get_theme_color("font_outline_color"));
|
||||
if (edited_control->has_theme_color_override(SNAME("font_outline_color"))) {
|
||||
ur->add_undo_method(edited_control, "add_theme_color_override", "font_outline_color", edited_control->get_theme_color(SNAME("font_outline_color")));
|
||||
}
|
||||
|
||||
ur->add_do_method(edited_control, "remove_theme_constant_override", "outline_size");
|
||||
if (edited_control->has_theme_constant_override("outline_size")) {
|
||||
ur->add_undo_method(edited_control, "add_theme_constant_override", "outline_size", edited_control->get_theme_constant("outline_size"));
|
||||
if (edited_control->has_theme_constant_override(SNAME("outline_size"))) {
|
||||
ur->add_undo_method(edited_control, "add_theme_constant_override", "outline_size", edited_control->get_theme_constant(SNAME("outline_size")));
|
||||
}
|
||||
|
||||
ur->add_do_method(edited_control, "end_bulk_theme_override");
|
||||
|
|
@ -600,7 +600,7 @@ TextControlEditor::TextControlEditor() {
|
|||
|
||||
font_size_list = memnew(SpinBox);
|
||||
font_size_list->set_tooltip(TTR("Font Size"));
|
||||
font_size_list->get_line_edit()->add_theme_constant_override("minimum_character_width", 2);
|
||||
font_size_list->get_line_edit()->add_theme_constant_override(SNAME("minimum_character_width"), 2);
|
||||
font_size_list->set_min(6);
|
||||
font_size_list->set_step(1);
|
||||
font_size_list->set_max(96);
|
||||
|
|
@ -619,7 +619,7 @@ TextControlEditor::TextControlEditor() {
|
|||
|
||||
outline_size_list = memnew(SpinBox);
|
||||
outline_size_list->set_tooltip(TTR("Outline Size"));
|
||||
outline_size_list->get_line_edit()->add_theme_constant_override("minimum_character_width", 2);
|
||||
outline_size_list->get_line_edit()->add_theme_constant_override(SNAME("minimum_character_width"), 2);
|
||||
outline_size_list->set_min(0);
|
||||
outline_size_list->set_step(1);
|
||||
outline_size_list->set_max(96);
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ void TextEditor::update_toggle_scripts_button() {
|
|||
TextEditor::TextEditor() {
|
||||
code_editor = memnew(CodeTextEditor);
|
||||
add_child(code_editor);
|
||||
code_editor->add_theme_constant_override("separation", 0);
|
||||
code_editor->add_theme_constant_override(SNAME("separation"), 0);
|
||||
code_editor->connect("load_theme_settings", callable_mp(this, &TextEditor::_load_theme_settings));
|
||||
code_editor->connect("validate_script", callable_mp(this, &TextEditor::_validate_script));
|
||||
code_editor->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
|
||||
|
|
|
|||
|
|
@ -171,11 +171,11 @@ Texture3DEditor::Texture3DEditor() {
|
|||
info->set_anchor(SIDE_TOP, 1);
|
||||
info->set_h_grow_direction(GROW_DIRECTION_BEGIN);
|
||||
info->set_v_grow_direction(GROW_DIRECTION_BEGIN);
|
||||
info->add_theme_color_override("font_color", Color(1, 1, 1, 1));
|
||||
info->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.5));
|
||||
info->add_theme_constant_override("shadow_outline_size", 1);
|
||||
info->add_theme_constant_override("shadow_offset_x", 2);
|
||||
info->add_theme_constant_override("shadow_offset_y", 2);
|
||||
info->add_theme_color_override(SNAME("font_color"), Color(1, 1, 1, 1));
|
||||
info->add_theme_color_override(SNAME("font_shadow_color"), Color(0, 0, 0, 0.5));
|
||||
info->add_theme_constant_override(SNAME("shadow_outline_size"), 1);
|
||||
info->add_theme_constant_override(SNAME("shadow_offset_x"), 2);
|
||||
info->add_theme_constant_override(SNAME("shadow_offset_y"), 2);
|
||||
|
||||
setting = false;
|
||||
layer->connect("value_changed", Callable(this, "_layer_changed"));
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void TexturePreview::_notification(int p_what) {
|
|||
|
||||
if (metadata_label) {
|
||||
Ref<Font> metadata_label_font = get_theme_font(SNAME("expression"), SNAME("EditorFonts"));
|
||||
metadata_label->add_theme_font_override("font", metadata_label_font);
|
||||
metadata_label->add_theme_font_override(SNAME("font"), metadata_label_font);
|
||||
}
|
||||
|
||||
checkerboard->set_texture(get_theme_icon(SNAME("Checkerboard"), SNAME("EditorIcons")));
|
||||
|
|
@ -94,14 +94,14 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
|
|||
p_texture->connect("changed", callable_mp(this, &TexturePreview::_update_metadata_label_text));
|
||||
|
||||
// It's okay that these colors are static since the grid color is static too.
|
||||
metadata_label->add_theme_color_override("font_color", Color::named("white"));
|
||||
metadata_label->add_theme_color_override("font_color_shadow", Color::named("black"));
|
||||
metadata_label->add_theme_color_override(SNAME("font_color"), Color::named("white"));
|
||||
metadata_label->add_theme_color_override(SNAME("font_color_shadow"), Color::named("black"));
|
||||
|
||||
metadata_label->add_theme_font_size_override("font_size", 16 * EDSCALE);
|
||||
metadata_label->add_theme_color_override("font_outline_color", Color::named("black"));
|
||||
metadata_label->add_theme_constant_override("outline_size", 2 * EDSCALE);
|
||||
metadata_label->add_theme_font_size_override(SNAME("font_size"), 16 * EDSCALE);
|
||||
metadata_label->add_theme_color_override(SNAME("font_outline_color"), Color::named("black"));
|
||||
metadata_label->add_theme_constant_override(SNAME("outline_size"), 2 * EDSCALE);
|
||||
|
||||
metadata_label->add_theme_constant_override("shadow_outline_size", 1);
|
||||
metadata_label->add_theme_constant_override(SNAME("shadow_outline_size"), 1);
|
||||
metadata_label->set_h_size_flags(Control::SIZE_SHRINK_END);
|
||||
metadata_label->set_v_size_flags(Control::SIZE_SHRINK_END);
|
||||
|
||||
|
|
|
|||
|
|
@ -247,11 +247,11 @@ TextureLayeredEditor::TextureLayeredEditor() {
|
|||
info->set_anchor(SIDE_TOP, 1);
|
||||
info->set_h_grow_direction(GROW_DIRECTION_BEGIN);
|
||||
info->set_v_grow_direction(GROW_DIRECTION_BEGIN);
|
||||
info->add_theme_color_override("font_color", Color(1, 1, 1, 1));
|
||||
info->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.5));
|
||||
info->add_theme_constant_override("shadow_outline_size", 1);
|
||||
info->add_theme_constant_override("shadow_offset_x", 2);
|
||||
info->add_theme_constant_override("shadow_offset_y", 2);
|
||||
info->add_theme_color_override(SNAME("font_color"), Color(1, 1, 1, 1));
|
||||
info->add_theme_color_override(SNAME("font_shadow_color"), Color(0, 0, 0, 0.5));
|
||||
info->add_theme_constant_override(SNAME("shadow_outline_size"), 1);
|
||||
info->add_theme_constant_override(SNAME("shadow_offset_x"), 2);
|
||||
info->add_theme_constant_override(SNAME("shadow_offset_y"), 2);
|
||||
|
||||
setting = false;
|
||||
layer->connect("value_changed", Callable(this, "_layer_changed"));
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ void TextureRegionEditor::_notification(int p_what) {
|
|||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
edit_draw->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
edit_draw->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
} break;
|
||||
case NOTIFICATION_READY: {
|
||||
zoom_out->set_icon(get_theme_icon(SNAME("ZoomLess"), SNAME("EditorIcons")));
|
||||
|
|
|
|||
|
|
@ -830,7 +830,7 @@ void ThemeItemImportTree::_notification(int p_what) {
|
|||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
select_icons_warning_icon->set_texture(get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")));
|
||||
select_icons_warning->add_theme_color_override("font_color", get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
|
||||
select_icons_warning->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
|
||||
|
||||
// Bottom panel buttons.
|
||||
import_collapse_types_button->set_icon(get_theme_icon(SNAME("CollapseTree"), SNAME("EditorIcons")));
|
||||
|
|
@ -1824,8 +1824,8 @@ void ThemeItemEditorDialog::_notification(int p_what) {
|
|||
|
||||
import_another_theme_button->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
|
||||
|
||||
tc->add_theme_style_override("tab_selected", get_theme_stylebox(SNAME("tab_selected_odd"), SNAME("TabContainer")));
|
||||
tc->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel_odd"), SNAME("TabContainer")));
|
||||
tc->add_theme_style_override(SNAME("tab_selected"), get_theme_stylebox(SNAME("tab_selected_odd"), SNAME("TabContainer")));
|
||||
tc->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("panel_odd"), SNAME("TabContainer")));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
@ -2389,7 +2389,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
|||
item_rename_cancel_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_canceled), varray(p_data_type, p_item_name, item_name_container));
|
||||
item_rename_cancel_button->hide();
|
||||
} else {
|
||||
item_name->add_theme_color_override("font_color", get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
|
||||
item_name->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
|
||||
|
||||
Button *item_override_button = memnew(Button);
|
||||
item_override_button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
|
||||
|
|
@ -3251,8 +3251,8 @@ void ThemeTypeEditor::_notification(int p_what) {
|
|||
data_type_tabs->set_tab_icon(5, get_theme_icon(SNAME("StyleBoxFlat"), SNAME("EditorIcons")));
|
||||
data_type_tabs->set_tab_icon(6, get_theme_icon(SNAME("Tools"), SNAME("EditorIcons")));
|
||||
|
||||
data_type_tabs->add_theme_style_override("tab_selected", get_theme_stylebox(SNAME("tab_selected_odd"), SNAME("TabContainer")));
|
||||
data_type_tabs->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel_odd"), SNAME("TabContainer")));
|
||||
data_type_tabs->add_theme_style_override(SNAME("tab_selected"), get_theme_stylebox(SNAME("tab_selected_odd"), SNAME("TabContainer")));
|
||||
data_type_tabs->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("panel_odd"), SNAME("TabContainer")));
|
||||
|
||||
type_variation_button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
|
||||
} break;
|
||||
|
|
@ -3532,9 +3532,9 @@ void ThemeEditor::_notification(int p_what) {
|
|||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
preview_tabs->add_theme_style_override("tab_selected", get_theme_stylebox(SNAME("ThemeEditorPreviewFG"), SNAME("EditorStyles")));
|
||||
preview_tabs->add_theme_style_override("tab_unselected", get_theme_stylebox(SNAME("ThemeEditorPreviewBG"), SNAME("EditorStyles")));
|
||||
preview_tabs_content->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel_odd"), SNAME("TabContainer")));
|
||||
preview_tabs->add_theme_style_override(SNAME("tab_selected"), get_theme_stylebox(SNAME("ThemeEditorPreviewFG"), SNAME("EditorStyles")));
|
||||
preview_tabs->add_theme_style_override(SNAME("tab_unselected"), get_theme_stylebox(SNAME("ThemeEditorPreviewBG"), SNAME("EditorStyles")));
|
||||
preview_tabs_content->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("panel_odd"), SNAME("TabContainer")));
|
||||
|
||||
add_preview_button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
|
||||
} break;
|
||||
|
|
@ -3586,7 +3586,7 @@ ThemeEditor::ThemeEditor() {
|
|||
VBoxContainer *preview_tabs_vb = memnew(VBoxContainer);
|
||||
preview_tabs_vb->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
preview_tabs_vb->set_custom_minimum_size(Size2(520, 0) * EDSCALE);
|
||||
preview_tabs_vb->add_theme_constant_override("separation", 2 * EDSCALE);
|
||||
preview_tabs_vb->add_theme_constant_override(SNAME("separation"), 2 * EDSCALE);
|
||||
main_hs->add_child(preview_tabs_vb);
|
||||
HBoxContainer *preview_tabbar_hb = memnew(HBoxContainer);
|
||||
preview_tabs_vb->add_child(preview_tabbar_hb);
|
||||
|
|
|
|||
|
|
@ -247,10 +247,10 @@ ThemeEditorPreview::ThemeEditorPreview() {
|
|||
|
||||
preview_content = memnew(MarginContainer);
|
||||
preview_root->add_child(preview_content);
|
||||
preview_content->add_theme_constant_override("margin_right", 4 * EDSCALE);
|
||||
preview_content->add_theme_constant_override("margin_top", 4 * EDSCALE);
|
||||
preview_content->add_theme_constant_override("margin_left", 4 * EDSCALE);
|
||||
preview_content->add_theme_constant_override("margin_bottom", 4 * EDSCALE);
|
||||
preview_content->add_theme_constant_override(SNAME("margin_right"), 4 * EDSCALE);
|
||||
preview_content->add_theme_constant_override(SNAME("margin_top"), 4 * EDSCALE);
|
||||
preview_content->add_theme_constant_override(SNAME("margin_left"), 4 * EDSCALE);
|
||||
preview_content->add_theme_constant_override(SNAME("margin_bottom"), 4 * EDSCALE);
|
||||
|
||||
preview_overlay = memnew(MarginContainer);
|
||||
preview_overlay->set_mouse_filter(MOUSE_FILTER_IGNORE);
|
||||
|
|
@ -269,20 +269,20 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
|
|||
preview_content->add_child(main_panel);
|
||||
|
||||
MarginContainer *main_mc = memnew(MarginContainer);
|
||||
main_mc->add_theme_constant_override("margin_right", 4 * EDSCALE);
|
||||
main_mc->add_theme_constant_override("margin_top", 4 * EDSCALE);
|
||||
main_mc->add_theme_constant_override("margin_left", 4 * EDSCALE);
|
||||
main_mc->add_theme_constant_override("margin_bottom", 4 * EDSCALE);
|
||||
main_mc->add_theme_constant_override(SNAME("margin_right"), 4 * EDSCALE);
|
||||
main_mc->add_theme_constant_override(SNAME("margin_top"), 4 * EDSCALE);
|
||||
main_mc->add_theme_constant_override(SNAME("margin_left"), 4 * EDSCALE);
|
||||
main_mc->add_theme_constant_override(SNAME("margin_bottom"), 4 * EDSCALE);
|
||||
preview_content->add_child(main_mc);
|
||||
|
||||
HBoxContainer *main_hb = memnew(HBoxContainer);
|
||||
main_mc->add_child(main_hb);
|
||||
main_hb->add_theme_constant_override("separation", 20 * EDSCALE);
|
||||
main_hb->add_theme_constant_override(SNAME("separation"), 20 * EDSCALE);
|
||||
|
||||
VBoxContainer *first_vb = memnew(VBoxContainer);
|
||||
main_hb->add_child(first_vb);
|
||||
first_vb->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
first_vb->add_theme_constant_override("separation", 10 * EDSCALE);
|
||||
first_vb->add_theme_constant_override(SNAME("separation"), 10 * EDSCALE);
|
||||
|
||||
first_vb->add_child(memnew(Label("Label")));
|
||||
|
||||
|
|
@ -343,7 +343,7 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
|
|||
VBoxContainer *second_vb = memnew(VBoxContainer);
|
||||
second_vb->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
main_hb->add_child(second_vb);
|
||||
second_vb->add_theme_constant_override("separation", 10 * EDSCALE);
|
||||
second_vb->add_theme_constant_override(SNAME("separation"), 10 * EDSCALE);
|
||||
LineEdit *le = memnew(LineEdit);
|
||||
le->set_text("LineEdit");
|
||||
second_vb->add_child(le);
|
||||
|
|
@ -383,7 +383,7 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
|
|||
|
||||
VBoxContainer *third_vb = memnew(VBoxContainer);
|
||||
third_vb->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
third_vb->add_theme_constant_override("separation", 10 * EDSCALE);
|
||||
third_vb->add_theme_constant_override(SNAME("separation"), 10 * EDSCALE);
|
||||
main_hb->add_child(third_vb);
|
||||
|
||||
TabContainer *tc = memnew(TabContainer);
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ TileAtlasView::TileAtlasView() {
|
|||
|
||||
hbox = memnew(HBoxContainer);
|
||||
hbox->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
|
||||
hbox->add_theme_constant_override("separation", 10);
|
||||
hbox->add_theme_constant_override(SNAME("separation"), 10);
|
||||
hbox->hide();
|
||||
margin_container->add_child(hbox);
|
||||
|
||||
|
|
|
|||
|
|
@ -2095,7 +2095,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
|
|||
scatter_spinbox->set_max(1000);
|
||||
scatter_spinbox->set_step(0.001);
|
||||
scatter_spinbox->set_tooltip(TTR("Defines the probability of painting nothing instead of a randomly selected tile."));
|
||||
scatter_spinbox->get_line_edit()->add_theme_constant_override("minimum_character_width", 4);
|
||||
scatter_spinbox->get_line_edit()->add_theme_constant_override(SNAME("minimum_character_width"), 4);
|
||||
scatter_spinbox->connect("value_changed", callable_mp(this, &TileMapEditorTilesPlugin::_on_scattering_spinbox_changed));
|
||||
tools_settings->add_child(scatter_spinbox);
|
||||
|
||||
|
|
|
|||
|
|
@ -609,8 +609,8 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
|
|||
}
|
||||
|
||||
// Theming.
|
||||
tile_data_editors_tree->add_theme_constant_override("vseparation", 1);
|
||||
tile_data_editors_tree->add_theme_constant_override("hseparation", 3);
|
||||
tile_data_editors_tree->add_theme_constant_override(SNAME("vseparation"), 1);
|
||||
tile_data_editors_tree->add_theme_constant_override(SNAME("hseparation"), 3);
|
||||
|
||||
Color group_color = get_theme_color(SNAME("prop_category"), SNAME("Editor"));
|
||||
|
||||
|
|
@ -908,10 +908,10 @@ void TileSetAtlasSourceEditor::_update_atlas_view() {
|
|||
alternative_tiles_control->add_child(button);
|
||||
button->set_flat(true);
|
||||
button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
|
||||
button->add_theme_style_override("normal", memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override("hover", memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override("focus", memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override("pressed", memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override(SNAME("normal"), memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override(SNAME("hover"), memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override(SNAME("focus"), memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override(SNAME("pressed"), memnew(StyleBoxEmpty));
|
||||
button->connect("pressed", callable_mp(tile_set_atlas_source, &TileSetAtlasSource::create_alternative_tile), varray(tile_id, TileSetSource::INVALID_TILE_ALTERNATIVE));
|
||||
button->set_rect(Rect2(Vector2(pos.x, pos.y + (y_increment - texture_region_base_size.y) / 2.0), Vector2(texture_region_base_size_min, texture_region_base_size_min)));
|
||||
button->set_expand_icon(true);
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
|||
} else {
|
||||
hb = memnew(HBoxContainer);
|
||||
}
|
||||
hb->add_theme_constant_override("separation", 7 * EDSCALE);
|
||||
hb->add_theme_constant_override(SNAME("separation"), 7 * EDSCALE);
|
||||
|
||||
Variant default_value;
|
||||
|
||||
|
|
@ -732,14 +732,14 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
|||
} else {
|
||||
Label *label = memnew(Label);
|
||||
label->set_text(name_left);
|
||||
label->add_theme_style_override("normal", label_style); //more compact
|
||||
label->add_theme_style_override(SNAME("normal"), label_style); //more compact
|
||||
hb->add_child(label);
|
||||
|
||||
if (vsnode->is_input_port_default(i, mode) && !port_left_used) {
|
||||
Label *hint_label = memnew(Label);
|
||||
hint_label->set_text(TTR("[default]"));
|
||||
hint_label->add_theme_color_override("font_color", editor->get_theme_color(SNAME("font_readonly_color"), SNAME("TextEdit")));
|
||||
hint_label->add_theme_style_override("normal", label_style);
|
||||
hint_label->add_theme_color_override(SNAME("font_color"), editor->get_theme_color(SNAME("font_readonly_color"), SNAME("TextEdit")));
|
||||
hint_label->add_theme_style_override(SNAME("normal"), label_style);
|
||||
hb->add_child(hint_label);
|
||||
}
|
||||
}
|
||||
|
|
@ -779,7 +779,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
|||
} else {
|
||||
Label *label = memnew(Label);
|
||||
label->set_text(name_right);
|
||||
label->add_theme_style_override("normal", label_style); //more compact
|
||||
label->add_theme_style_override(SNAME("normal"), label_style); //more compact
|
||||
hb->add_child(label);
|
||||
}
|
||||
}
|
||||
|
|
@ -896,7 +896,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
|||
String error = vsnode->get_warning(mode, p_type);
|
||||
if (!error.is_empty()) {
|
||||
Label *error_label = memnew(Label);
|
||||
error_label->add_theme_color_override("font_color", editor->get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
error_label->add_theme_color_override(SNAME("font_color"), editor->get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
error_label->set_text(error);
|
||||
node->add_child(error_label);
|
||||
}
|
||||
|
|
@ -920,7 +920,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
|||
Color members_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
|
||||
|
||||
expression_box->set_syntax_highlighter(expression_syntax_highlighter);
|
||||
expression_box->add_theme_color_override("background_color", background_color);
|
||||
expression_box->add_theme_color_override(SNAME("background_color"), background_color);
|
||||
|
||||
for (const String &E : editor->keyword_list) {
|
||||
if (ShaderLanguage::is_control_flow_keyword(E)) {
|
||||
|
|
@ -930,9 +930,9 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
|||
}
|
||||
}
|
||||
|
||||
expression_box->add_theme_font_override("font", editor->get_theme_font(SNAME("expression"), SNAME("EditorFonts")));
|
||||
expression_box->add_theme_font_size_override("font_size", editor->get_theme_font_size(SNAME("expression_size"), SNAME("EditorFonts")));
|
||||
expression_box->add_theme_color_override("font_color", text_color);
|
||||
expression_box->add_theme_font_override(SNAME("font"), editor->get_theme_font(SNAME("expression"), SNAME("EditorFonts")));
|
||||
expression_box->add_theme_font_size_override(SNAME("font_size"), editor->get_theme_font_size(SNAME("expression_size"), SNAME("EditorFonts")));
|
||||
expression_box->add_theme_color_override(SNAME("font_color"), text_color);
|
||||
expression_syntax_highlighter->set_number_color(number_color);
|
||||
expression_syntax_highlighter->set_symbol_color(symbol_color);
|
||||
expression_syntax_highlighter->set_function_color(function_color);
|
||||
|
|
@ -1512,10 +1512,10 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) {
|
|||
const Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0, 0.85) : Color(0.0, 0.0, 0.0, 0.85);
|
||||
c = mono_color;
|
||||
|
||||
node->add_theme_color_override("title_color", c);
|
||||
node->add_theme_color_override(SNAME("title_color"), c);
|
||||
c.a = 0.7;
|
||||
node->add_theme_color_override("close_color", c);
|
||||
node->add_theme_color_override("resizer_color", c);
|
||||
node->add_theme_color_override(SNAME("close_color"), c);
|
||||
node->add_theme_color_override(SNAME("resizer_color"), c);
|
||||
}
|
||||
|
||||
void VisualShaderEditor::_update_uniforms(bool p_update_refs) {
|
||||
|
|
@ -3421,7 +3421,7 @@ void VisualShaderEditor::_notification(int p_what) {
|
|||
Color number_color = EDITOR_GET("text_editor/theme/highlighting/number_color");
|
||||
Color members_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
|
||||
|
||||
preview_text->add_theme_color_override("background_color", background_color);
|
||||
preview_text->add_theme_color_override(SNAME("background_color"), background_color);
|
||||
|
||||
for (const String &E : keyword_list) {
|
||||
if (ShaderLanguage::is_control_flow_keyword(E)) {
|
||||
|
|
@ -3431,9 +3431,9 @@ void VisualShaderEditor::_notification(int p_what) {
|
|||
}
|
||||
}
|
||||
|
||||
preview_text->add_theme_font_override("font", get_theme_font(SNAME("expression"), SNAME("EditorFonts")));
|
||||
preview_text->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("expression_size"), SNAME("EditorFonts")));
|
||||
preview_text->add_theme_color_override("font_color", text_color);
|
||||
preview_text->add_theme_font_override(SNAME("font"), get_theme_font(SNAME("expression"), SNAME("EditorFonts")));
|
||||
preview_text->add_theme_font_size_override(SNAME("font_size"), get_theme_font_size(SNAME("expression_size"), SNAME("EditorFonts")));
|
||||
preview_text->add_theme_color_override(SNAME("font_color"), text_color);
|
||||
syntax_highlighter->set_number_color(number_color);
|
||||
syntax_highlighter->set_symbol_color(symbol_color);
|
||||
syntax_highlighter->set_function_color(function_color);
|
||||
|
|
@ -3446,10 +3446,10 @@ void VisualShaderEditor::_notification(int p_what) {
|
|||
preview_text->add_comment_delimiter("/*", "*/", false);
|
||||
preview_text->add_comment_delimiter("//", "", true);
|
||||
|
||||
error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||
error_label->add_theme_font_override("font", get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
|
||||
error_label->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
|
||||
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
error_panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("panel"), SNAME("Panel")));
|
||||
error_label->add_theme_font_override(SNAME("font"), get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
|
||||
error_label->add_theme_font_size_override(SNAME("font_size"), get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
|
||||
error_label->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
}
|
||||
|
||||
tools->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Tools"), SNAME("EditorIcons")));
|
||||
|
|
@ -4301,7 +4301,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
|
||||
preview_vbox = memnew(VBoxContainer);
|
||||
preview_window->add_child(preview_vbox);
|
||||
preview_vbox->add_theme_constant_override("separation", 0);
|
||||
preview_vbox->add_theme_constant_override(SNAME("separation"), 0);
|
||||
|
||||
preview_text = memnew(CodeEdit);
|
||||
syntax_highlighter.instantiate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue