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

jira: STUDIO-12347
Change-Id: If03e23f2ee7cbb5dcb124453fb0a1ea67c3633a0
(cherry picked from commit 8a22fab6d73fe2694b5006712d5e72619ddea51c)
This commit is contained in:
zhou.xu
2025-05-23 09:59:23 +08:00
committed by Noisyfox
parent 9d3526958a
commit 517b6c09a8
7 changed files with 24 additions and 23 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

@@ -475,7 +475,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(0x009688));
m_link_Terms_title->SetForegroundColour(wxColour("#009688"));
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 terms and 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\"). "
@@ -496,7 +496,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(0x009688));
m_link_privacy_title->SetForegroundColour(wxColour("#009688"));
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();
@@ -536,7 +536,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(0x009688));
m_link_notice_title->SetForegroundColour(wxColour("#009688"));
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

@@ -558,10 +558,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

@@ -587,7 +587,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();
}
@@ -1613,10 +1613,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);
@@ -1748,13 +1747,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

@@ -324,7 +324,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(0x009688));
m_ams_backup_tip->SetForegroundColour(wxColour("#009688"));
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);
@@ -2388,7 +2388,7 @@ void SelectMachineDialog::save_option_vals(MachineObject *obj) {
void SelectMachineDialog::Enable_Auto_Refill(bool enable)
{
if (enable) {
m_ams_backup_tip->SetForegroundColour(wxColour(0x009688));
m_ams_backup_tip->SetForegroundColour(wxColour("#009688"));
}
else {
m_ams_backup_tip->SetForegroundColour(wxColour(0x90, 0x90, 0x90));

View File

@@ -2027,7 +2027,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));