From c9da06e44a10ecadfa55ac2e1df4f63a48d5d685 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 15 Dec 2020 16:02:59 +0100 Subject: [PATCH] Fix for text color for the mode buttons under Linux with GTK2 (related to #5444) --- src/slic3r/GUI/wxExtensions.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 0ebe5ae2f..c52864db3 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -16,10 +16,7 @@ #include "Plater.hpp" #include "../Utils/MacDarkMode.hpp" -#ifdef __linux__ -#define wxLinux true -#else -#define wxLinux false +#ifndef __linux__ // msw_menuitem_bitmaps is used for MSW and OSX static std::map msw_menuitem_bitmaps; #ifdef __WXMSW__ @@ -660,7 +657,13 @@ void ModeButton::focus_button(const bool focus) Slic3r::GUI::wxGetApp().normal_font(); SetFont(new_font); - SetForegroundColour(wxSystemSettings::GetColour(focus ? wxSYS_COLOUR_BTNTEXT : wxLinux ? wxSYS_COLOUR_GRAYTEXT : wxSYS_COLOUR_BTNSHADOW)); + SetForegroundColour(wxSystemSettings::GetColour(focus ? wxSYS_COLOUR_BTNTEXT : +#if defined (__linux__) && defined (__WXGTK3__) + wxSYS_COLOUR_GRAYTEXT +#else + wxSYS_COLOUR_BTNSHADOW +#endif + )); Refresh(); Update();