FIX: Incomplete copy display in Transfer or discard dialog

Jira: 5569 5549

Change-Id: I757b636259d7e1a222b9fc09276c12235360fd57
This commit is contained in:
maosheng.wei 2023-12-14 16:58:21 +08:00 committed by Lane.Wei
parent 33b9fbc4a0
commit ea0b202a63
2 changed files with 9 additions and 1 deletions

View File

@ -117,7 +117,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
}); });
} }
add_button(wxID_CANCEL,false,"Cancel"); add_button(wxID_CANCEL,false, _L("Cancel"));
finalize(); finalize();
#ifdef __linux__ #ifdef __linux__

View File

@ -1601,6 +1601,14 @@ void UnsavedChangesDialog::update_list()
m_scrolledWindow->SetSizer(m_listsizer); m_scrolledWindow->SetSizer(m_listsizer);
// m_scrolledWindow->Layout(); // m_scrolledWindow->Layout();
wxSize text_size = m_action_line->GetTextExtent(m_action_line->GetLabel());
int width = UNSAVE_CHANGE_DIALOG_ACTION_LINE_SIZE.GetWidth();
// +2: Ensure that there is at least one line and that the content contains '\n'
int rows = int(text_size.GetWidth() / width) + 2;
int height = rows * text_size.GetHeight();
m_action_line->SetMinSize(wxSize(width, height));
Layout();
Fit();
} }
std::string UnsavedChangesDialog::subreplace(std::string resource_str, std::string sub_str, std::string new_str) std::string UnsavedChangesDialog::subreplace(std::string resource_str, std::string sub_str, std::string new_str)