diff --git a/resources/images/map_mode_disabled.svg b/resources/images/map_mode_disabled.svg
index 91440c962..8a0c30a80 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 4f6d4006c..7755a981f 100644
--- a/src/slic3r/GUI/BitmapCache.cpp
+++ b/src/slic3r/GUI/BitmapCache.cpp
@@ -333,6 +333,8 @@ wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_
replaces["\"#6B6B6B\""] = "\"#818182\"";
replaces["\"#909090\""] = "\"#FFFFFF\"";
replaces["\"#00FF00\""] = "\"#FF0000\"";
+ replaces["\"#F1F1F1\""] = "\"#36363B\"";
+ replaces["\"#DBDBDB\""] = "\"#4A4A51\"";
}
if (!new_color.empty())
replaces["\"#00AE42\""] = "\"" + new_color + "\"";
diff --git a/src/slic3r/GUI/FilamentGroupPopup.cpp b/src/slic3r/GUI/FilamentGroupPopup.cpp
index 43a11365c..a88694cf5 100644
--- a/src/slic3r/GUI/FilamentGroupPopup.cpp
+++ b/src/slic3r/GUI/FilamentGroupPopup.cpp
@@ -90,6 +90,14 @@ bool open_filament_group_wiki()
return false;
}
+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)
{
@@ -125,12 +133,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);
@@ -247,10 +250,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);
@@ -376,7 +384,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 b4fe14e43..509a95884 100644
--- a/src/slic3r/GUI/FilamentGroupPopup.hpp
+++ b/src/slic3r/GUI/FilamentGroupPopup.hpp
@@ -32,6 +32,8 @@ private:
void OnTimer(wxTimerEvent &event);
void Dismiss();
+ void CreateBmps();
+
void Init();
void UpdateButtonStatus(int hover_idx = -1);
void DrawRoundedCorner(int radius);
@@ -53,7 +55,6 @@ private:
wxTimer *m_timer;
std::vector radio_btns;
- std::vector global_mode_tags;
std::vector