mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
FIX:fixed incomplete operation buttons
jira:[STUDIO-4119] Change-Id: I73dd64fae9a42bfe248e6535d9cedb1343a2cc08 (cherry picked from commit f3176c419506a337ebb2801c66dffa4a4c8ae788)
This commit is contained in:
parent
165bb96e35
commit
b27dc119d7
4 changed files with 36 additions and 24 deletions
|
@ -26,7 +26,7 @@ namespace Slic3r { namespace GUI {
|
|||
|
||||
wxDEFINE_EVENT(EVT_SECONDARY_CHECK_CONFIRM, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_SECONDARY_CHECK_CANCEL, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_SECONDARY_CHECK_FUNC, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_SECONDARY_CHECK_DONE, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_CHECKBOX_CHANGE, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_ENTER_IP_ADDRESS, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_CLOSE_IPADDRESS_DLG, wxCommandEvent);
|
||||
|
@ -531,10 +531,10 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
|
|||
|
||||
auto bottom_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
auto sizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||
StateColor btn_bg_green(std::pair<wxColour, int>(wxColour(27, 136, 68), StateColor::Pressed), std::pair<wxColour, int>(wxColour(61, 203, 115), StateColor::Hovered),
|
||||
btn_bg_green = StateColor(std::pair<wxColour, int>(wxColour(27, 136, 68), StateColor::Pressed), std::pair<wxColour, int>(wxColour(61, 203, 115), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(AMS_CONTROL_BRAND_COLOUR, StateColor::Normal));
|
||||
|
||||
StateColor btn_bg_white(std::pair<wxColour, int>(wxColour(206, 206, 206), StateColor::Pressed), std::pair<wxColour, int>(wxColour(238, 238, 238), StateColor::Hovered),
|
||||
btn_bg_white = StateColor(std::pair<wxColour, int>(wxColour(206, 206, 206), StateColor::Pressed), std::pair<wxColour, int>(wxColour(238, 238, 238), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(*wxWHITE, StateColor::Normal));
|
||||
|
||||
|
||||
|
@ -609,7 +609,7 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
|
|||
m_button_fn->SetCornerRadius(FromDIP(12));
|
||||
|
||||
m_button_fn->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& e) {
|
||||
post_event(wxCommandEvent(EVT_SECONDARY_CHECK_FUNC));
|
||||
post_event(wxCommandEvent(EVT_SECONDARY_CHECK_DONE));
|
||||
e.Skip();
|
||||
});
|
||||
|
||||
|
@ -617,14 +617,20 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
|
|||
m_button_cancel->Show();
|
||||
m_button_fn->Hide();
|
||||
m_button_retry->Hide();
|
||||
} else if (btn_style == CONFIRM_AND_FUNC) {
|
||||
} else if (btn_style == CONFIRM_AND_DONE) {
|
||||
m_button_cancel->Hide();
|
||||
m_button_fn->Show();
|
||||
m_button_retry->Hide();
|
||||
} else if (btn_style == CONFIRM_AND_RETRY) {
|
||||
m_button_retry->Show();
|
||||
m_button_cancel->Hide();
|
||||
} else {
|
||||
m_button_fn->Hide();
|
||||
} else if (style == DONE_AND_RETRY) {
|
||||
m_button_retry->Show();
|
||||
m_button_fn->Show();
|
||||
m_button_cancel->Hide();
|
||||
}
|
||||
else {
|
||||
m_button_retry->Hide();
|
||||
m_button_cancel->Hide();
|
||||
m_button_fn->Hide();
|
||||
|
@ -734,7 +740,7 @@ void SecondaryCheckDialog::update_title_style(wxString title, SecondaryCheckDial
|
|||
m_button_fn->Hide();
|
||||
m_button_retry->Hide();
|
||||
}
|
||||
else if (style == CONFIRM_AND_FUNC) {
|
||||
else if (style == CONFIRM_AND_DONE) {
|
||||
m_button_cancel->Hide();
|
||||
m_button_fn->Show();
|
||||
m_button_retry->Hide();
|
||||
|
@ -742,6 +748,12 @@ void SecondaryCheckDialog::update_title_style(wxString title, SecondaryCheckDial
|
|||
else if (style == CONFIRM_AND_RETRY) {
|
||||
m_button_retry->Show();
|
||||
m_button_cancel->Hide();
|
||||
m_button_fn->Hide();
|
||||
}
|
||||
else if (style == DONE_AND_RETRY) {
|
||||
m_button_retry->Show();
|
||||
m_button_fn->Show();
|
||||
m_button_cancel->Hide();
|
||||
}
|
||||
else {
|
||||
m_button_retry->Hide();
|
||||
|
@ -753,12 +765,6 @@ void SecondaryCheckDialog::update_title_style(wxString title, SecondaryCheckDial
|
|||
Layout();
|
||||
}
|
||||
|
||||
void SecondaryCheckDialog::update_func_btn(wxString func_btn_text)
|
||||
{
|
||||
m_button_fn->SetLabel(func_btn_text);
|
||||
rescale();
|
||||
}
|
||||
|
||||
void SecondaryCheckDialog::update_btn_label(wxString ok_btn_text, wxString cancel_btn_text)
|
||||
{
|
||||
m_button_ok->SetLabel(ok_btn_text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue