FIX: correct the strings and move create printer dialog center
Jira: 5221 5183 Change-Id: Ida4eba63f0e962ffcc8000fcc04cf20849577217 Signed-off-by: maosheng.wei <maosheng.wei@bambulab.com>
This commit is contained in:
parent
b77217f33e
commit
ac6cc81591
|
@ -1762,7 +1762,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_hot_bed_stl_item(wxWindow *parent)
|
|||
StateColor flush_bd_col(std::pair<wxColour, int>(wxColour(0, 174, 66), StateColor::Pressed), std::pair<wxColour, int>(wxColour(0, 174, 66), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(wxColour(172, 172, 172), StateColor::Normal));
|
||||
|
||||
m_button_bed_stl = new Button(parent, _L("Upload"));
|
||||
m_button_bed_stl = new Button(parent, _L("Load"));
|
||||
m_button_bed_stl->Bind(wxEVT_BUTTON, ([this](wxCommandEvent &e) { load_model_stl(); }));
|
||||
m_button_bed_stl->SetFont(Label::Body_10);
|
||||
|
||||
|
@ -1799,7 +1799,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_hot_bed_svg_item(wxWindow *parent)
|
|||
StateColor flush_bd_col(std::pair<wxColour, int>(wxColour(0, 174, 66), StateColor::Pressed), std::pair<wxColour, int>(wxColour(0, 174, 66), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(wxColour(172, 172, 172), StateColor::Normal));
|
||||
|
||||
m_button_bed_svg = new Button(parent, _L("Upload"));
|
||||
m_button_bed_svg = new Button(parent, _L("Load"));
|
||||
m_button_bed_svg->Bind(wxEVT_BUTTON, ([this](wxCommandEvent &e) { load_texture(); }));
|
||||
m_button_bed_svg->SetFont(Label::Body_10);
|
||||
|
||||
|
@ -2168,6 +2168,29 @@ void CreatePrinterPresetDialog::update_preset_list_size()
|
|||
Layout();
|
||||
Fit();
|
||||
Refresh();
|
||||
wxSize screen_size = wxGetDisplaySize();
|
||||
int pos_x, pos_y, size_x, size_y, screen_width, screen_height, dialog_x, dialog_y;
|
||||
pos_x = GetPosition().x;
|
||||
pos_y = GetPosition().y;
|
||||
size_x = GetSize().x;
|
||||
size_y = GetSize().y;
|
||||
screen_width = screen_size.GetWidth();
|
||||
screen_height = screen_size.GetHeight();
|
||||
dialog_x = pos_x;
|
||||
dialog_y = pos_y;
|
||||
if (pos_x + size_x > screen_width) {
|
||||
int exceed_x = pos_x + size_x - screen_width;
|
||||
dialog_x -= exceed_x;
|
||||
|
||||
}
|
||||
if (pos_y + size_y > screen_height - FromDIP(50)) { // FromDIP(50) task bar
|
||||
int exceed_y = pos_y + size_y - screen_height + FromDIP(50);
|
||||
dialog_y -= exceed_y;
|
||||
}
|
||||
if (pos_x != dialog_x || pos_y != dialog_y) {
|
||||
SetPosition(wxPoint(dialog_x, dialog_y));
|
||||
}
|
||||
|
||||
m_scrolled_preset_window->Thaw();
|
||||
}
|
||||
|
||||
|
|
|
@ -1532,7 +1532,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
m_slice_select = eSlicePlate;
|
||||
m_print_select = ePrintPlate;
|
||||
|
||||
m_publish_btn = new Button(this, _L("Upload"), "bar_publish", 0, FromDIP(16));
|
||||
m_publish_btn = new Button(this, _L("Share"), "bar_publish", 0, FromDIP(16));
|
||||
m_slice_btn = new SideButton(this, _L("Slice plate"), "");
|
||||
m_slice_option_btn = new SideButton(this, "", "sidebutton_dropdown", 0, FromDIP(14));
|
||||
m_print_btn = new SideButton(this, _L("Print plate"), "");
|
||||
|
|
|
@ -153,13 +153,13 @@ wxBoxSizer *PreferencesDialog::create_item_language_combobox(
|
|||
language_name = wxString::FromUTF8("\xED\x95\x9C\xEA\xB5\xAD\xEC\x96\xB4");
|
||||
}
|
||||
else if (vlist[i] == wxLocale::GetLanguageInfo(wxLANGUAGE_RUSSIAN)) {
|
||||
language_name = wxString::FromUTF8("\xD1\x80\xD1\x83\xD1\x81\xD1\x81\xD0\xBA");
|
||||
language_name = wxString::FromUTF8("\xD0\xA0\xD1\x83\xD1\x81\xD1\x81\xD0\xBA\xD0\xB8\xD0\xB9");
|
||||
}
|
||||
else if (vlist[i] == wxLocale::GetLanguageInfo(wxLANGUAGE_CZECH)) {
|
||||
language_name = wxString::FromUTF8("\xC4\x8D\x65\xC5\xA1\x74\x69\x6E\x61");
|
||||
}
|
||||
else if (vlist[i] == wxLocale::GetLanguageInfo(wxLANGUAGE_UKRAINIAN)) {
|
||||
language_name = wxString::FromUTF8("\xD1\x83\xD0\xBA\xD1\x80\xD0\xB0\xD1\x97\xD1\x9D\xD1\x81\xD1\x8C\xD0\xBA\xD0\xB0");
|
||||
language_name = wxString::FromUTF8("\xD0\xA3\xD0\xBA\xD1\x80\xD0\xB0\xD1\x97\xD0\xBD\xD1\x81\xD1\x8C\xD0\xBA\xD0\xB0");
|
||||
}
|
||||
|
||||
if (language == vlist[i]->CanonicalName) {
|
||||
|
|
Loading…
Reference in New Issue