From 23ab9fb1810789cbb89e502855896254ae97733f Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 29 Oct 2021 08:46:29 +0200 Subject: [PATCH] MSW DarkMode: Set mode colors for "Change volume type" dialog. --- src/slic3r/GUI/GUI_App.cpp | 2 +- src/slic3r/GUI/GUI_App.hpp | 1 + src/slic3r/GUI/GUI_ObjectList.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 787382c23..f52dd3d58 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1577,7 +1577,7 @@ static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguage } #endif -static int GetSingleChoiceIndex(const wxString& message, +int GUI_App::GetSingleChoiceIndex(const wxString& message, const wxString& caption, const wxArrayString& choices, int initialSelection) diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index ad42803f6..cbabd16e7 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -326,6 +326,7 @@ public: bool is_gl_version_greater_or_equal_to(unsigned int major, unsigned int minor) const { return m_opengl_mgr.get_gl_info().is_version_greater_or_equal_to(major, minor); } bool is_glsl_version_greater_or_equal_to(unsigned int major, unsigned int minor) const { return m_opengl_mgr.get_gl_info().is_glsl_version_greater_or_equal_to(major, minor); } + int GetSingleChoiceIndex(const wxString& message, const wxString& caption, const wxArrayString& choices, int initialSelection); #ifdef __WXMSW__ void associate_3mf_files(); diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 43ebd23f2..8a24bee2e 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -3783,7 +3783,7 @@ void ObjectList::change_part_type() } const wxString names[] = { _L("Part"), _L("Negative Volume"), _L("Modifier"), _L("Support Blocker"), _L("Support Enforcer") }; - auto new_type = ModelVolumeType(wxGetSingleChoiceIndex(_L("Type:"), _L("Select type of part"), wxArrayString(5, names), int(type))); + auto new_type = ModelVolumeType(wxGetApp().GetSingleChoiceIndex(_L("Type:"), _L("Select type of part"), wxArrayString(5, names), int(type))); if (new_type == type || new_type == ModelVolumeType::INVALID) return;