summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-29 08:42:45 +0200
committerGitHub <noreply@github.com>2019-08-29 08:42:45 +0200
commit94805cb0bc015f717d050ee8747b2f6c913a1af1 (patch)
treed405a6757a3ec0bdacd69ee5de38a110442a995a
parent1af1b791892db9f3ea4e5b8a775133895ef56b34 (diff)
parentedc360056058f2a919ec5642dd04c2d1adea3ef0 (diff)
Merge pull request #31755 from YeldhamDev/assetlib_minor_cleanup
Minor cleanup of the AssetLib's asset dialog
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp13
-rw-r--r--editor/plugins/asset_library_editor_plugin.h1
2 files changed, 5 insertions, 9 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index fecab89d23..cb68f5eaaf 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -196,14 +196,15 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
} break;
}
}
+
void EditorAssetLibraryItemDescription::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
previews_bg->add_style_override("panel", get_stylebox("normal", "TextEdit"));
- desc_bg->add_style_override("panel", get_stylebox("normal", "TextEdit"));
} break;
}
}
+
void EditorAssetLibraryItemDescription::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_image"), &EditorAssetLibraryItemDescription::set_image);
ClassDB::bind_method(D_METHOD("_link_click"), &EditorAssetLibraryItemDescription::_link_click);
@@ -283,16 +284,12 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
item = memnew(EditorAssetLibraryItem);
desc_vbox->add_child(item);
- desc_vbox->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
-
- desc_bg = memnew(PanelContainer);
- desc_vbox->add_child(desc_bg);
- desc_bg->set_v_size_flags(SIZE_EXPAND_FILL);
+ desc_vbox->set_custom_minimum_size(Size2(440 * EDSCALE, 0));
description = memnew(RichTextLabel);
- desc_bg->add_child(description);
+ desc_vbox->add_child(description);
+ description->set_v_size_flags(SIZE_EXPAND_FILL);
description->connect("meta_clicked", this, "_link_click");
- description->set_custom_minimum_size(Size2(440 * EDSCALE, 300 * EDSCALE));
VBoxContainer *previews_vbox = memnew(VBoxContainer);
hbox->add_child(previews_vbox);
diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index d81606c284..b17a6dfe54 100644
--- a/editor/plugins/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -91,7 +91,6 @@ class EditorAssetLibraryItemDescription : public ConfirmationDialog {
ScrollContainer *previews;
HBoxContainer *preview_hb;
PanelContainer *previews_bg;
- PanelContainer *desc_bg;
struct Preview {
int id;