ENH: add global map mode tag for pop up

1. Add tag to mark the global map mode
2. Fix some wrong usage of bmp in code
3. Fix display error in dark mode

jira:STUDIO-9729

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Idb36a5022c403e02c26d7fe23a95dd6877deca90
(cherry picked from commit 5a2abf7e211327cde57717b5ab7b79b63c967bbd)
This commit is contained in:
xun.zhang
2025-01-10 12:06:59 +08:00
committed by Noisyfox
parent ea759fdc90
commit 19b466ccf0
9 changed files with 63 additions and 43 deletions

View File

@@ -115,9 +115,10 @@ GUI::FilamentMapBtnPanel::FilamentMapBtnPanel(wxWindow *parent, const wxString &
auto sizer = new wxBoxSizer(wxVERTICAL);
m_icon_path = icon;
auto bmp = create_scaled_bitmap(icon, nullptr, 20);
m_btn = new wxBitmapButton(this, wxID_ANY, bmp, wxDefaultPosition, wxDefaultSize, wxNO_BORDER);
icon_enabled = create_scaled_bitmap(icon, nullptr, 20);
icon_disabled = create_scaled_bitmap(icon + "_disabled", nullptr, 20);
m_btn = new wxBitmapButton(this, wxID_ANY, icon_enabled, wxDefaultPosition, wxDefaultSize, wxNO_BORDER);
m_btn->SetBackgroundColour(*wxWHITE);
m_label = new wxStaticText(this, wxID_ANY, label);
@@ -204,13 +205,13 @@ void FilamentMapBtnPanel::UpdateStatus()
m_detail->SetBackgroundColour(BgNormalColor);
}
if (!m_enabled) {
m_btn->SetBitmap(create_scaled_bitmap(m_icon_path + "_disabled", nullptr, 20));
m_btn->SetBitmap(icon_disabled);
m_btn->SetForegroundColour(BgDisableColor);
m_label->SetForegroundColour(TextDisableColor);
m_detail->SetForegroundColour(TextDisableColor);
}
else {
m_btn->SetBitmap(create_scaled_bitmap(m_icon_path, nullptr, 20));
m_btn->SetBitmap(icon_enabled);
m_btn->SetForegroundColour(BgNormalColor);
m_label->SetForegroundColour(TextNormalBlackColor);
m_detail->SetForegroundColour(TextNormalGreyColor);