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:
yw4z
2025-12-18 15:14:56 +03:00
committed by GitHub
parent 59ad126b48
commit 00ff06a5d3
67 changed files with 406 additions and 1401 deletions

View File

@@ -341,12 +341,8 @@ void SendMultiMachinePage::on_dpi_changed(const wxRect& suggested_rect)
print_weight->msw_rescale();
timeimg->SetBitmap(print_time->bmp());
weightimg->SetBitmap(print_weight->bmp());
m_button_add->Rescale();
m_button_add->SetMinSize(wxSize(FromDIP(90), FromDIP(36)));
m_button_add->SetMaxSize(wxSize(FromDIP(90), FromDIP(36)));
m_button_send->Rescale();
m_button_send->SetMinSize(wxSize(FromDIP(120), FromDIP(40)));
m_button_send->SetMinSize(wxSize(FromDIP(120), FromDIP(40)));
m_button_add->Rescale(); // ORCA no need to re set size
m_button_send->Rescale(); // ORCA no need to re set size
for (auto it = m_device_items.begin(); it != m_device_items.end(); ++it) {
it->second->Refresh();
@@ -1349,21 +1345,8 @@ wxPanel* SendMultiMachinePage::create_page()
m_tip_text->SetFont(::Label::Head_20);
m_tip_text->Wrap(-1);
auto m_btn_bg_enable = StateColor(
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::Normal)
);
m_button_add = new Button(main_page, _L("Add"));
m_button_add->SetBackgroundColor(m_btn_bg_enable);
m_button_add->SetBorderColor(m_btn_bg_enable);
m_button_add->SetTextColor(*wxWHITE);
m_button_add->SetFont(Label::Body_12);
m_button_add->SetCornerRadius(6);
m_button_add->SetMinSize(wxSize(FromDIP(90), FromDIP(36)));
m_button_add->SetMaxSize(wxSize(FromDIP(90), FromDIP(36)));
m_button_add->SetStyle(ButtonStyle::Confirm, ButtonType::Window);
m_button_add->Bind(wxEVT_BUTTON, [this](wxCommandEvent& evt) {
MultiMachinePickPage dlg;
dlg.ShowModal();
@@ -1412,17 +1395,8 @@ wxPanel* SendMultiMachinePage::create_page()
sizer->AddSpacer(FromDIP(10));
// add send button
btn_bg_enable = StateColor(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::Normal));
m_button_send = new Button(main_page, _L("Send"));
m_button_send->SetBackgroundColor(btn_bg_enable);
m_button_send->SetBorderColor(btn_bg_enable);
m_button_send->SetTextColor(StateColor::darkModeColorFor("#FFFFFE"));
m_button_send->SetSize(wxSize(FromDIP(120), FromDIP(40)));
m_button_send->SetMinSize(wxSize(FromDIP(120), FromDIP(40)));
m_button_send->SetMinSize(wxSize(FromDIP(120), FromDIP(40)));
m_button_send->SetCornerRadius(FromDIP(5));
m_button_send->SetStyle(ButtonStyle::Confirm, ButtonType::Choice);
m_button_send->Bind(wxEVT_BUTTON, &SendMultiMachinePage::on_send, this);
//m_button_send->Disable();
//m_button_send->SetBackgroundColor(wxColour(0x90, 0x90, 0x90));