1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

[Scene] Add SceneStringNames::panel

This commit is contained in:
A Thousand Ships
2024-05-14 15:50:53 +02:00
parent 755a0efbb6
commit 926afccbd8
55 changed files with 149 additions and 145 deletions

View File

@@ -127,7 +127,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
Ref<StyleBoxEmpty> border;
border.instantiate();
border->set_content_margin_all(5 * EDSCALE);
add_theme_style_override("panel", border);
add_theme_style_override(SceneStringName(panel), border);
HBoxContainer *hb = memnew(HBoxContainer);
// Add some spacing to visually separate the icon from the asset details.
@@ -240,7 +240,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(CoreStringName(normal), SNAME("TextEdit")));
previews_bg->add_theme_style_override(SceneStringName(panel), previews->get_theme_stylebox(CoreStringName(normal), SNAME("TextEdit")));
} break;
}
}
@@ -456,7 +456,7 @@ void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asse
void EditorAssetLibraryItemDownload::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("AssetLib")));
panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("AssetLib")));
status->add_theme_color_override("font_color", get_theme_color(SNAME("status_color"), SNAME("AssetLib")));
dismiss_button->set_texture_normal(get_theme_icon(SNAME("dismiss"), SNAME("AssetLib")));
} break;
@@ -631,7 +631,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
void EditorAssetLibrary::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("AssetLib")));
add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("bg"), SNAME("AssetLib")));
error_label->move_to_front();
} break;
@@ -639,8 +639,8 @@ void EditorAssetLibrary::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
error_tr->set_texture(get_editor_theme_icon(SNAME("Error")));
filter->set_right_icon(get_editor_theme_icon(SNAME("Search")));
library_scroll_bg->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree")));
downloads_scroll->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree")));
library_scroll_bg->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
downloads_scroll->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
error_label->add_theme_color_override("color", get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
} break;
@@ -1698,7 +1698,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(SceneStringName(panel), border2);
library_vb_border->set_h_size_flags(Control::SIZE_EXPAND_FILL);
library_vb = memnew(VBoxContainer);