mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
ErrorDialog: Fix size and message encoding
This commit is contained in:
parent
306d77559e
commit
360b34944d
3 changed files with 4 additions and 3 deletions
|
@ -607,7 +607,7 @@ void show_error(wxWindow* parent, const wxString& message) {
|
|||
|
||||
void show_error_id(int id, const std::string& message) {
|
||||
auto *parent = id != 0 ? wxWindow::FindWindowById(id) : nullptr;
|
||||
show_error(parent, message);
|
||||
show_error(parent, wxString::FromUTF8(message.data()));
|
||||
}
|
||||
|
||||
void show_info(wxWindow* parent, const wxString& message, const wxString& title){
|
||||
|
|
|
@ -71,11 +71,12 @@ ErrorDialog::ErrorDialog(wxWindow *parent, const wxString &msg) :
|
|||
text->Wrap(CONTENT_WIDTH);
|
||||
p_sizer->Add(text, 1, wxEXPAND);
|
||||
|
||||
panel->SetMinSize(wxSize(CONTENT_WIDTH, CONTENT_HEIGHT));
|
||||
panel->SetMinSize(wxSize(CONTENT_WIDTH, 0));
|
||||
panel->SetScrollRate(0, 5);
|
||||
|
||||
content_sizer->Add(panel, 1, wxEXPAND);
|
||||
|
||||
SetMaxSize(wxSize(-1, CONTENT_MAX_HEIGHT));
|
||||
Fit();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ struct MsgDialog : wxDialog
|
|||
protected:
|
||||
enum {
|
||||
CONTENT_WIDTH = 500,
|
||||
CONTENT_HEIGHT = 300,
|
||||
CONTENT_MAX_HEIGHT = 600,
|
||||
BORDER = 30,
|
||||
VERT_SPACING = 15,
|
||||
HORIZ_SPACING = 5,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue