mirror of
https://github.com/godotengine/godot.git
synced 2025-01-01 15:52:56 +00:00
Merge pull request #31755 from YeldhamDev/assetlib_minor_cleanup
Minor cleanup of the AssetLib's asset dialog
This commit is contained in:
commit
94805cb0bc
@ -196,14 +196,15 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
|
|||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorAssetLibraryItemDescription::_notification(int p_what) {
|
void EditorAssetLibraryItemDescription::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
previews_bg->add_style_override("panel", get_stylebox("normal", "TextEdit"));
|
previews_bg->add_style_override("panel", get_stylebox("normal", "TextEdit"));
|
||||||
desc_bg->add_style_override("panel", get_stylebox("normal", "TextEdit"));
|
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorAssetLibraryItemDescription::_bind_methods() {
|
void EditorAssetLibraryItemDescription::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("set_image"), &EditorAssetLibraryItemDescription::set_image);
|
ClassDB::bind_method(D_METHOD("set_image"), &EditorAssetLibraryItemDescription::set_image);
|
||||||
ClassDB::bind_method(D_METHOD("_link_click"), &EditorAssetLibraryItemDescription::_link_click);
|
ClassDB::bind_method(D_METHOD("_link_click"), &EditorAssetLibraryItemDescription::_link_click);
|
||||||
@ -283,16 +284,12 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
|
|||||||
item = memnew(EditorAssetLibraryItem);
|
item = memnew(EditorAssetLibraryItem);
|
||||||
|
|
||||||
desc_vbox->add_child(item);
|
desc_vbox->add_child(item);
|
||||||
desc_vbox->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
|
desc_vbox->set_custom_minimum_size(Size2(440 * EDSCALE, 0));
|
||||||
|
|
||||||
desc_bg = memnew(PanelContainer);
|
|
||||||
desc_vbox->add_child(desc_bg);
|
|
||||||
desc_bg->set_v_size_flags(SIZE_EXPAND_FILL);
|
|
||||||
|
|
||||||
description = memnew(RichTextLabel);
|
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->connect("meta_clicked", this, "_link_click");
|
||||||
description->set_custom_minimum_size(Size2(440 * EDSCALE, 300 * EDSCALE));
|
|
||||||
|
|
||||||
VBoxContainer *previews_vbox = memnew(VBoxContainer);
|
VBoxContainer *previews_vbox = memnew(VBoxContainer);
|
||||||
hbox->add_child(previews_vbox);
|
hbox->add_child(previews_vbox);
|
||||||
|
@ -91,7 +91,6 @@ class EditorAssetLibraryItemDescription : public ConfirmationDialog {
|
|||||||
ScrollContainer *previews;
|
ScrollContainer *previews;
|
||||||
HBoxContainer *preview_hb;
|
HBoxContainer *preview_hb;
|
||||||
PanelContainer *previews_bg;
|
PanelContainer *previews_bg;
|
||||||
PanelContainer *desc_bg;
|
|
||||||
|
|
||||||
struct Preview {
|
struct Preview {
|
||||||
int id;
|
int id;
|
||||||
|
Loading…
Reference in New Issue
Block a user