mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Match button styles on whole UI and fixes for button class (#11233)
* init * web buttons * Bind Dialog & Fix states * update * update * Update common.css * objcolordialog * privacy update dialog * Update CaliHistoryDialog.cpp * Update MultiMachineManagerPage.cpp * Update AMSControl.cpp * TipsDialog * Update AMSMaterialsSetting.cpp * extrusion calibration * Update UpdateDialogs.cpp * recenterdialog * update * Update Calibration.cpp * update * update * update * fix * update * ReleaseNote * update * update * fix remember checkbox position * add comments
This commit is contained in:
@@ -226,17 +226,7 @@ MachineInfoPanel::MachineInfoPanel(wxWindow* parent, wxWindowID id, const wxPoin
|
||||
m_main_right_sizer->Add(0, FromDIP(50), 0, wxEXPAND, FromDIP(5));
|
||||
|
||||
m_button_upgrade_firmware = new Button(this, _L("Update firmware"));
|
||||
StateColor btn_bg(std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Disabled), std::pair<wxColour, int>(wxColour(0, 137, 123), StateColor::Pressed),
|
||||
std::pair<wxColour, int>(wxColour(38, 166, 154), StateColor::Hovered), std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Enabled),
|
||||
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal));
|
||||
StateColor btn_bd(std::pair<wxColour, int>(wxColour(144, 144, 144), StateColor::Disabled), std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Enabled));
|
||||
StateColor btn_text(std::pair<wxColour, int>(wxColour(144, 144, 144), StateColor::Disabled), std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Enabled));
|
||||
m_button_upgrade_firmware->SetBackgroundColor(btn_bg);
|
||||
m_button_upgrade_firmware->SetBorderColor(btn_bd);
|
||||
m_button_upgrade_firmware->SetTextColor(btn_text);
|
||||
m_button_upgrade_firmware->SetFont(Label::Body_10);
|
||||
m_button_upgrade_firmware->SetMinSize(wxSize(FromDIP(-1), FromDIP(24)));
|
||||
m_button_upgrade_firmware->SetCornerRadius(FromDIP(12));
|
||||
m_button_upgrade_firmware->SetStyle(ButtonStyle::Confirm, ButtonType::Choice);
|
||||
m_main_right_sizer->Add(m_button_upgrade_firmware, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, FromDIP(5));
|
||||
|
||||
m_staticText_upgrading_info = new wxStaticText(this, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, 0);
|
||||
@@ -1440,7 +1430,7 @@ void UpgradePanel::update(MachineObject *obj)
|
||||
if (m_obj->upgrade_force_upgrade) {
|
||||
m_show_forced_hint = false; //lock hint
|
||||
if (force_dlg == nullptr) {
|
||||
force_dlg = new SecondaryCheckDialog(this->GetParent(), wxID_ANY, _L("Update firmware"), SecondaryCheckDialog::ButtonStyle::CONFIRM_AND_CANCEL, wxDefaultPosition, wxDefaultSize);
|
||||
force_dlg = new SecondaryCheckDialog(this->GetParent(), wxID_ANY, _L("Update firmware"), SecondaryCheckDialog::VisibleButtons::CONFIRM_AND_CANCEL, wxDefaultPosition, wxDefaultSize); // ORCA VisibleButtons instead ButtonStyle
|
||||
force_dlg->Bind(EVT_SECONDARY_CHECK_CONFIRM, [this](wxCommandEvent& e) {
|
||||
if (m_obj) {
|
||||
m_obj->command_upgrade_confirm();
|
||||
@@ -1465,7 +1455,7 @@ void UpgradePanel::update(MachineObject *obj)
|
||||
if (m_obj->upgrade_consistency_request) {
|
||||
m_show_consistency_hint = false;
|
||||
if (consistency_dlg == nullptr) {
|
||||
consistency_dlg = new SecondaryCheckDialog(this->GetParent(), wxID_ANY, _L("Update firmware"), SecondaryCheckDialog::ButtonStyle::CONFIRM_AND_CANCEL, wxDefaultPosition, wxDefaultSize);
|
||||
consistency_dlg = new SecondaryCheckDialog(this->GetParent(), wxID_ANY, _L("Update firmware"), SecondaryCheckDialog::VisibleButtons::CONFIRM_AND_CANCEL, wxDefaultPosition, wxDefaultSize); // ORCA VisibleButtons instead ButtonStyle
|
||||
consistency_dlg->Bind(EVT_SECONDARY_CHECK_CONFIRM, [this](wxCommandEvent& e) {
|
||||
if (m_obj) {
|
||||
m_obj->command_consistency_upgrade_confirm();
|
||||
|
||||
Reference in New Issue
Block a user