mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 12:41:18 -07:00
NEW: add confirm dialog after check conditions
confirm to check printer model and slice warnings Change-Id: I07a272fda1a5e2ebc0f4e106815fe07da5aaa4df Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
a84cf46699
commit
ee62ffcc7d
10 changed files with 124 additions and 6 deletions
|
|
@ -104,8 +104,13 @@ void ConfirmHintDialog::render(wxDC& dc) {
|
|||
auto text_size = dc.GetTextExtent(count_txt);
|
||||
if (text_size.x + pos_firm_up_hint.x + FromDIP(25) < wxSize(FromDIP(475), FromDIP(100)).x)
|
||||
{
|
||||
if (firm_up_hint[i] == ' ' || firm_up_hint[i] == '\n')
|
||||
if (firm_up_hint[i] == ' ') {
|
||||
new_line_pos = i;
|
||||
} else if (firm_up_hint[i] == '\n') {
|
||||
fisrt_line = firm_up_hint.SubString(0, i);
|
||||
remaining_line = firm_up_hint.SubString(i + 1, firm_up_hint.length());
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!is_ch) {
|
||||
|
|
@ -123,7 +128,6 @@ void ConfirmHintDialog::render(wxDC& dc) {
|
|||
}
|
||||
dc.DrawText(fisrt_line, pos_firm_up_hint);
|
||||
|
||||
|
||||
count_txt = "";
|
||||
new_line_pos = 0;
|
||||
for (int i = 0; i < remaining_line.length(); i++) {
|
||||
|
|
@ -167,6 +171,12 @@ void ConfirmHintDialog::on_button_close(wxCommandEvent& event) {
|
|||
this->Close();
|
||||
}
|
||||
|
||||
bool ConfirmHintDialog::Show(bool show)
|
||||
{
|
||||
if (show) { CentreOnParent(); }
|
||||
return DPIDialog::Show(show);
|
||||
}
|
||||
|
||||
void ConfirmHintDialog::on_dpi_changed(const wxRect& suggested_rect) {
|
||||
m_button_confirm->SetMinSize(wxSize(-1, FromDIP(24)));
|
||||
m_button_confirm->SetCornerRadius(FromDIP(12));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue