diff --git a/resources/images/map_mode_disabled.svg b/resources/images/map_mode_disabled.svg
index 91440c9620..8a0c30a80c 100644
--- a/resources/images/map_mode_disabled.svg
+++ b/resources/images/map_mode_disabled.svg
@@ -1,3 +1,3 @@
diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp
index 87774b3ba5..89c188cd5a 100644
--- a/src/slic3r/GUI/BitmapCache.cpp
+++ b/src/slic3r/GUI/BitmapCache.cpp
@@ -336,6 +336,7 @@ wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_
replaces["\"#909090\""] = "\"#FFFFFF\"";
replaces["\"#00FF00\""] = "\"#FF0000\"";
replaces["\"#009688\""] = "\"#00675b\"";
+ replaces["\"#F1F1F1\""] = "\"#36363B\"";
replaces["#DBDBDB"] = "#4A4A51"; // ORCA border color
replaces["#F0F0F1"] = "#333337"; // ORCA disabled background color
replaces["#262E30"] = "#EFEFF0"; // ORCA
diff --git a/src/slic3r/GUI/FilamentGroupPopup.cpp b/src/slic3r/GUI/FilamentGroupPopup.cpp
index 047202feb9..f704870d87 100644
--- a/src/slic3r/GUI/FilamentGroupPopup.cpp
+++ b/src/slic3r/GUI/FilamentGroupPopup.cpp
@@ -46,6 +46,14 @@ static void set_prefered_map_mode(FilamentMapMode mode)
app_config->set("prefered_filament_map_mode", mode_str);
}
+void FilamentGroupPopup::CreateBmps()
+{
+ checked_bmp = create_scaled_bitmap("map_mode_on", nullptr, 16);;
+ unchecked_bmp = create_scaled_bitmap("map_mode_off", nullptr, 16);
+ disabled_bmp = create_scaled_bitmap("map_mode_disabled", nullptr, 16);
+ checked_hover_bmp = create_scaled_bitmap("map_mode_on_hovered", nullptr, 16);
+ unchecked_hover_bmp = create_scaled_bitmap("map_mode_off_hovered", nullptr, 16);
+}
FilamentGroupPopup::FilamentGroupPopup(wxWindow *parent) : PopupWindow(parent, wxBORDER_NONE | wxPU_CONTAINS_CONTROLS)
{
@@ -81,12 +89,7 @@ FilamentGroupPopup::FilamentGroupPopup(wxWindow *parent) : PopupWindow(parent, w
std::vector mode_details = {AutoForFlushDetail, AutoForMatchDetail, ManualDetail};
top_sizer->AddSpacer(vertical_margin);
- checked_bmp = create_scaled_bitmap("map_mode_on", nullptr, 16);;
- unchecked_bmp = create_scaled_bitmap("map_mode_off", nullptr, 16);
- disabled_bmp = create_scaled_bitmap("map_mode_disabled", nullptr, 16);
- checked_hover_bmp = create_scaled_bitmap("map_mode_on_hovered", nullptr, 16);
- unchecked_hover_bmp = create_scaled_bitmap("map_mode_off_hovered", nullptr, 16);
- global_tag_bmp = create_scaled_bitmap("global_map_mode_tag", nullptr, 16);
+ CreateBmps();
for (size_t idx = 0; idx < ButtonType::btCount; ++idx) {
wxBoxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
@@ -190,10 +193,15 @@ void FilamentGroupPopup::DrawRoundedCorner(int radius)
void FilamentGroupPopup::Init()
{
+ static bool is_dark_mode = wxGetApp().dark_mode();
+ if (is_dark_mode != wxGetApp().dark_mode()) {
+ CreateBmps();
+ is_dark_mode = wxGetApp().dark_mode();
+ }
+
const wxString AutoForMatchDesp = "";// _L("(Pre-slicing arrangement)");
const wxString MachineSyncTip = _L("(Sync with printer)");
- radio_btns[ButtonType::btForMatch]->Enable(m_connected);
if (m_connected) {
button_labels[ButtonType::btForMatch]->SetForegroundColour(LabelEnableColor);
button_desps[ButtonType::btForMatch]->SetForegroundColour(LabelEnableColor);
@@ -319,7 +327,6 @@ void FilamentGroupPopup::OnEnterWindow(wxMouseEvent &) { ResetTimer(); }
void FilamentGroupPopup::UpdateButtonStatus(int hover_idx)
{
- auto global_mode = plater_ref->get_global_filament_map_mode();
for (int i = 0; i < ButtonType::btCount; ++i) {
#if 0 // do not display global mode tag
if (mode_list.at(i) == global_mode)
diff --git a/src/slic3r/GUI/FilamentGroupPopup.hpp b/src/slic3r/GUI/FilamentGroupPopup.hpp
index 2ed28c3e6b..aef3f85c0f 100644
--- a/src/slic3r/GUI/FilamentGroupPopup.hpp
+++ b/src/slic3r/GUI/FilamentGroupPopup.hpp
@@ -29,6 +29,8 @@ private:
void OnTimer(wxTimerEvent &event);
void Dismiss();
+ void CreateBmps();
+
void Init();
void UpdateButtonStatus(int hover_idx = -1);
void DrawRoundedCorner(int radius);
@@ -50,7 +52,6 @@ private:
wxTimer *m_timer;
std::vector radio_btns;
- std::vector global_mode_tags;
std::vector