FIX:WxColour (0x00AE42) represents bgr input, incorrect use

jira: STUDIO-12347
Change-Id: If03e23f2ee7cbb5dcb124453fb0a1ea67c3633a0
This commit is contained in:
zhou.xu 2025-05-23 09:59:23 +08:00 committed by lane.wei
parent cdb9acc8a4
commit 8a22fab6d7
8 changed files with 25 additions and 24 deletions

View File

@ -71,7 +71,7 @@ BBLStatusBarPrint::BBLStatusBarPrint(wxWindow *parent, int id)
m_sizer_status_text = new wxBoxSizer(wxHORIZONTAL);
m_link_show_error = new Label(top_panel, _L("Check the reason"));
m_link_show_error->SetForegroundColour(wxColour(0x00ae42));
m_link_show_error->SetForegroundColour(wxColour("#00AE42"));
m_link_show_error->SetFont(::Label::Head_13);
m_link_show_error->Bind(wxEVT_ENTER_WINDOW, [this](auto &e) { this->m_self->SetCursor(wxCURSOR_HAND); });
m_link_show_error->Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) { this->m_self->SetCursor(wxCURSOR_ARROW); });

View File

@ -480,7 +480,7 @@ PingCodeBindDialog::~PingCodeBindDialog() {
m_link_Terms_title->SetFont(Label::Head_13);
m_link_Terms_title->SetMaxSize(wxSize(FromDIP(450), -1));
m_link_Terms_title->Wrap(FromDIP(450));
m_link_Terms_title->SetForegroundColour(wxColour(0x00AE42));
m_link_Terms_title->SetForegroundColour(wxColour("#00AE42"));
m_link_Terms_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
wxString txt = _L("Thank you for purchasing a Bambu Lab device.Before using your Bambu Lab device, please read the termsand conditions.By clicking to agree to use your Bambu Lab device, you agree to abide by the Privacy Policy and Terms of Use(collectively, the \"Terms\"). If you do not comply with or agree to the Bambu Lab Privacy Policy, please do not use Bambu Lab equipment and services.");
ConfirmBeforeSendDialog confirm_dlg(this, wxID_ANY, _L("Terms and Conditions"), ConfirmBeforeSendDialog::ButtonStyle::ONLY_CONFIRM);
@ -499,7 +499,7 @@ PingCodeBindDialog::~PingCodeBindDialog() {
m_link_privacy_title->SetFont(Label::Head_13);
m_link_privacy_title->SetMaxSize(wxSize(FromDIP(450), -1));
m_link_privacy_title->Wrap(FromDIP(450));
m_link_privacy_title->SetForegroundColour(wxColour(0x00AE42));
m_link_privacy_title->SetForegroundColour(wxColour("#00AE42"));
m_link_privacy_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
std::string url;
std::string country_code = Slic3r::GUI::wxGetApp().app_config->get_country_code();
@ -539,7 +539,7 @@ PingCodeBindDialog::~PingCodeBindDialog() {
m_link_notice_title->SetFont(Label::Head_13);
m_link_notice_title->SetMaxSize(wxSize(FromDIP(450), -1));
m_link_notice_title->Wrap(FromDIP(450));
m_link_notice_title->SetForegroundColour(wxColour(0x00AE42));
m_link_notice_title->SetForegroundColour(wxColour("#0x00AE42"));
m_link_notice_title->Bind(wxEVT_ENTER_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_HAND); });
m_link_notice_title->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW); });
m_link_notice_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {

View File

@ -563,10 +563,12 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
m_btn_sync = new Button(parent, "", "ams_nozzle_sync");
m_btn_sync->SetToolTip(_L("Synchronize nozzle and AMS information"));
m_btn_sync->SetCornerRadius(8);
StateColor btn_sync_bg_col(std::pair<wxColour, int>(wxColour(0xCECECE), StateColor::Pressed), std::pair<wxColour, int>(wxColour(0xF8F8F8), StateColor::Hovered),
std::pair<wxColour, int>(wxColour(0xF8F8F8), StateColor::Normal));
StateColor btn_sync_bd_col(std::pair<wxColour, int>(wxColour(0x00AE42), StateColor::Pressed), std::pair<wxColour, int>(wxColour(0x00AE42), StateColor::Hovered),
std::pair<wxColour, int>(wxColour(0xEEEEEE), StateColor::Normal));
StateColor btn_sync_bg_col(std::pair<wxColour, int>(wxColour("#CECECE"), StateColor::Pressed),
std::pair<wxColour, int>(wxColour("#F8F8F8"), StateColor::Hovered),
std::pair<wxColour, int>(wxColour("#F8F8F8"), StateColor::Normal));
StateColor btn_sync_bd_col(std::pair<wxColour, int>(wxColour("#00AE42"), StateColor::Pressed),
std::pair<wxColour, int>(wxColour("#00AE42"), StateColor::Hovered),
std::pair<wxColour, int>(wxColour("#EEEEEE"), StateColor::Normal));
m_btn_sync->SetBackgroundColor(btn_sync_bg_col);
m_btn_sync->SetBorderColor(btn_sync_bd_col);
m_btn_sync->SetCanFocus(false);

View File

@ -573,7 +573,7 @@ void Sidebar::priv::flush_printer_sync(bool restart)
*counter_sync_printer = 6;
timer_sync_printer->Start(500);
}
btn_sync_printer->SetBackgroundColorNormal((*counter_sync_printer & 1) ? 0xF8F8F8 : 0x00AE42);
btn_sync_printer->SetBackgroundColorNormal((*counter_sync_printer & 1) ? "#F8F8F8" :"#00AE42");
if (--*counter_sync_printer <= 0)
timer_sync_printer->Stop();
}
@ -1550,10 +1550,9 @@ Sidebar::Sidebar(Plater *parent)
/*************************** 2. add printer content ************************/
p->m_panel_printer_content = new wxPanel(p->scrolled, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
p->m_panel_printer_content->SetBackgroundColour(wxColour(255, 255, 255));
StateColor panel_bd_col(std::pair<wxColour, int>(wxColour(0x00AE42), StateColor::Pressed),
std::pair<wxColour, int>(wxColour(0x00AE42), StateColor::Hovered),
std::pair<wxColour, int>(wxColour(0xEEEEEE), StateColor::Normal));
StateColor panel_bd_col(std::pair<wxColour, int>(wxColour("#00AE42"), StateColor::Pressed),
std::pair<wxColour, int>(wxColour("#00AE42"), StateColor::Hovered),
std::pair<wxColour, int>(wxColour("#EEEEEE"), StateColor::Normal));
p->panel_printer_preset = new StaticBox(p->m_panel_printer_content);
p->panel_printer_preset->SetCornerRadius(8);
@ -1692,13 +1691,13 @@ Sidebar::Sidebar(Plater *parent)
btn_sync->SetToolTip(_L("Synchronize nozzle information and the number of AMS"));
btn_sync->SetCornerRadius(8);
StateColor btn_sync_bg_col(
std::pair<wxColour, int>(wxColour(0xCECECE), StateColor::Pressed),
std::pair<wxColour, int>(wxColour(0xF8F8F8), StateColor::Hovered),
std::pair<wxColour, int>(wxColour(0xF8F8F8), StateColor::Normal));
std::pair<wxColour, int>(wxColour("#CECECE"), StateColor::Pressed),
std::pair<wxColour, int>(wxColour("#F8F8F8"), StateColor::Hovered),
std::pair<wxColour, int>(wxColour("#F8F8F8"), StateColor::Normal));
StateColor btn_sync_bd_col(
std::pair<wxColour, int>(wxColour(0x00AE42), StateColor::Pressed),
std::pair<wxColour, int>(wxColour(0x00AE42), StateColor::Hovered),
std::pair<wxColour, int>(wxColour(0xEEEEEE), StateColor::Normal));
std::pair<wxColour, int>(wxColour("#00AE42"), StateColor::Pressed),
std::pair<wxColour, int>(wxColour("#00AE42"), StateColor::Hovered),
std::pair<wxColour, int>(wxColour("#EEEEEE"), StateColor::Normal));
btn_sync->SetBackgroundColor(btn_sync_bg_col);
btn_sync->SetBorderColor(btn_sync_bd_col);
btn_sync->SetCanFocus(false);

View File

@ -325,7 +325,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_sizer_autorefill = new wxBoxSizer(wxHORIZONTAL);
m_ams_backup_tip = new Label(m_scroll_area, _L("Auto Refill"));
m_ams_backup_tip->SetFont(::Label::Head_13);
m_ams_backup_tip->SetForegroundColour(wxColour(0x00AE42));
m_ams_backup_tip->SetForegroundColour(wxColour("#00AE42"));
m_ams_backup_tip->SetBackgroundColour(*wxWHITE);
img_ams_backup = new wxStaticBitmap(m_scroll_area, wxID_ANY, create_scaled_bitmap("automatic_material_renewal", this, 16), wxDefaultPosition, wxSize(FromDIP(16), FromDIP(16)), 0);
img_ams_backup->SetBackgroundColour(*wxWHITE);
@ -2393,7 +2393,7 @@ void SelectMachineDialog::save_option_vals(MachineObject *obj) {
void SelectMachineDialog::Enable_Auto_Refill(bool enable)
{
if (enable) {
m_ams_backup_tip->SetForegroundColour(wxColour(0x00AE42));
m_ams_backup_tip->SetForegroundColour(wxColour("#00AE42"));
}
else {
m_ams_backup_tip->SetForegroundColour(wxColour(0x90, 0x90, 0x90));

View File

@ -2025,7 +2025,7 @@ void SyncAmsInfoDialog::Enable_Auto_Refill(bool enable)
{
if (!m_ams_backup_tip) { return; }
if (enable) {
m_ams_backup_tip->SetForegroundColour(wxColour(0x00AE42));
m_ams_backup_tip->SetForegroundColour(wxColour("#00AE42"));
} else {
m_ams_backup_tip->SetForegroundColour(wxColour(0x90, 0x90, 0x90));
}

View File

@ -375,7 +375,7 @@ FanControlNew::FanControlNew(wxWindow *parent, const AirDuctData &fan_data, int
sizer_control->Add(sizer_control_top, 0, wxEXPAND, 0);
m_static_status_name = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END | wxALIGN_CENTER_HORIZONTAL);
m_static_status_name->SetForegroundColour(wxColour(0x00AE42));
m_static_status_name->SetForegroundColour(wxColour("#00AE42"));
m_static_status_name->SetBackgroundColour(wxColour(248, 248, 248));
m_static_status_name->SetFont(Label::Head_18);
m_static_status_name->SetMinSize(wxSize(FromDIP(100), -1));

View File

@ -305,7 +305,7 @@ void TabCtrl::doRender(wxDC& dc)
#else
dc.SetPen(wxPen(border_color.colorForStates(states), border_width));
dc.DrawLine(0, size.y - BS2, size.x, size.y - BS2);
wxColor c(0x42AE00);
wxColour c("#00AE42");
dc.SetPen(wxPen(c, 1));
dc.SetBrush(c);
dc.DrawRoundedRectangle(x1 - radius, size.y - BS2 - border_width * 3, x2 + radius * 2 - x1, border_width * 3, radius);