diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-16 23:50:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 23:50:18 +0100 |
commit | 178961a6dc14155c0e65ec0040a2b2b328550317 (patch) | |
tree | 8370d5a632e346aa43590590a790cd121e41fe6a | |
parent | cd500eee8b1e6b2e3a0f6971b521291415eda6ce (diff) | |
parent | fc0e657e8fe75636bcd7efd23ba46037c3751690 (diff) |
Merge pull request #59183 from YeldhamDev/assetlib_less_borders
Remove extra borders from the AssetLib plugin
-rw-r--r-- | editor/editor_themes.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/project_manager.cpp | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index d21049414c..28feac5d2b 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1532,6 +1532,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("Information3dViewport", "EditorStyles", style_info_3d_viewport); // Asset Library. + theme->set_stylebox("bg", "AssetLib", style_empty); theme->set_stylebox("panel", "AssetLib", style_content_panel); theme->set_color("status_color", "AssetLib", Color(0.5, 0.5, 0.5)); theme->set_icon("dismiss", "AssetLib", theme->get_icon(SNAME("Close"), SNAME("EditorIcons"))); diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index fd9b665b20..1468d63daf 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -577,6 +577,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"))); error_label->raise(); } break; @@ -1377,7 +1378,6 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { initial_loading = true; VBoxContainer *library_main = memnew(VBoxContainer); - add_child(library_main); HBoxContainer *search_hb = memnew(HBoxContainer); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 35902fd354..d32f935b54 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1895,6 +1895,11 @@ void ProjectManager::_notification(int p_what) { // to search without having to reach for their mouse search_box->grab_focus(); } + + if (asset_library) { + // Removes extra border margins. + asset_library->add_theme_style_override("panel", memnew(StyleBoxEmpty)); + } } break; case NOTIFICATION_VISIBILITY_CHANGED: { |