Export dialog: Fix error color and link alignment
Also fix extraneous "- " line when there are more than 2 messages.
(cherry picked from commit 5542d4a830
)
This commit is contained in:
parent
68d09255bd
commit
7586957720
|
@ -218,7 +218,7 @@ void ProjectExportDialog::_edit_preset(int p_index) {
|
||||||
|
|
||||||
if (error != String()) {
|
if (error != String()) {
|
||||||
|
|
||||||
Vector<String> items = error.split("\n");
|
Vector<String> items = error.split("\n", false);
|
||||||
error = "";
|
error = "";
|
||||||
for (int i = 0; i < items.size(); i++) {
|
for (int i = 0; i < items.size(); i++) {
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
|
@ -743,7 +743,7 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
|
||||||
|
|
||||||
Error err = platform->export_project(current, export_debug->is_pressed(), p_path, 0);
|
Error err = platform->export_project(current, export_debug->is_pressed(), p_path, 0);
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted: ") + platform->get_name());
|
error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " " + platform->get_name());
|
||||||
error_dialog->show();
|
error_dialog->show();
|
||||||
error_dialog->popup_centered_minsize(Size2(300, 80));
|
error_dialog->popup_centered_minsize(Size2(300, 80));
|
||||||
ERR_PRINT("Failed to export project");
|
ERR_PRINT("Failed to export project");
|
||||||
|
@ -943,7 +943,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||||
export_error = memnew(Label);
|
export_error = memnew(Label);
|
||||||
main_vb->add_child(export_error);
|
main_vb->add_child(export_error);
|
||||||
export_error->hide();
|
export_error->hide();
|
||||||
export_error->add_color_override("font_color", get_color("error_color", "Editor"));
|
export_error->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
|
||||||
|
|
||||||
export_templates_error = memnew(HBoxContainer);
|
export_templates_error = memnew(HBoxContainer);
|
||||||
main_vb->add_child(export_templates_error);
|
main_vb->add_child(export_templates_error);
|
||||||
|
@ -951,7 +951,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||||
|
|
||||||
Label *export_error2 = memnew(Label);
|
Label *export_error2 = memnew(Label);
|
||||||
export_templates_error->add_child(export_error2);
|
export_templates_error->add_child(export_error2);
|
||||||
export_error2->add_color_override("font_color", get_color("error_color", "Editor"));
|
export_error2->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
|
||||||
export_error2->set_text(" - " + TTR("Export templates for this platform are missing:") + " ");
|
export_error2->set_text(" - " + TTR("Export templates for this platform are missing:") + " ");
|
||||||
|
|
||||||
error_dialog = memnew(AcceptDialog);
|
error_dialog = memnew(AcceptDialog);
|
||||||
|
@ -962,6 +962,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
||||||
|
|
||||||
LinkButton *download_templates = memnew(LinkButton);
|
LinkButton *download_templates = memnew(LinkButton);
|
||||||
download_templates->set_text(TTR("Manage Export Templates"));
|
download_templates->set_text(TTR("Manage Export Templates"));
|
||||||
|
download_templates->set_v_size_flags(SIZE_SHRINK_CENTER);
|
||||||
export_templates_error->add_child(download_templates);
|
export_templates_error->add_child(download_templates);
|
||||||
download_templates->connect("pressed", this, "_open_export_template_manager");
|
download_templates->connect("pressed", this, "_open_export_template_manager");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue