From 254e311593f4c5a70e5f6aab9f082c2109295328 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 6 Mar 2018 13:34:39 +0100 Subject: [PATCH] Delete background color changing (except of MSW) --- xs/src/slic3r/GUI/Field.cpp | 2 +- xs/src/slic3r/GUI/Field.hpp | 6 ++++++ xs/src/slic3r/GUI/OptionsGroup.hpp | 6 ------ xs/src/slic3r/GUI/Tab.cpp | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index d64ae876bd..13b3fde66b 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -22,7 +22,7 @@ namespace Slic3r { namespace GUI { m_Undo_btn = new wxButton(m_parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); // use bouth of temporary_icons till don't have "undo_icon" auto color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); - m_Undo_btn->SetBackgroundColour(color); + if (wxMSW) m_Undo_btn->SetBackgroundColour(color); m_Undo_btn->SetBitmap(wxBitmap(from_u8(var("Bullet_white.png")), wxBITMAP_TYPE_PNG)); m_Undo_btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent){ on_back_to_initial_value(); })); diff --git a/xs/src/slic3r/GUI/Field.hpp b/xs/src/slic3r/GUI/Field.hpp index 454cd1430a..662636796e 100644 --- a/xs/src/slic3r/GUI/Field.hpp +++ b/xs/src/slic3r/GUI/Field.hpp @@ -20,6 +20,12 @@ #include "GUI.hpp" #include "Utils.hpp" +#ifdef __WXMSW__ +#define wxMSW true +#else +#define wxMSW false +#endif + namespace Slic3r { namespace GUI { class Field; diff --git a/xs/src/slic3r/GUI/OptionsGroup.hpp b/xs/src/slic3r/GUI/OptionsGroup.hpp index 56755595bb..bf096809f9 100644 --- a/xs/src/slic3r/GUI/OptionsGroup.hpp +++ b/xs/src/slic3r/GUI/OptionsGroup.hpp @@ -19,12 +19,6 @@ #define wxOSX false #endif -#ifdef __WXMSW__ -#define wxMSW true -#else -#define wxMSW false -#endif - #define BORDER(a, b) ((wxOSX ? a : b)) namespace Slic3r { namespace GUI { diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 36cfc0cb1b..f61e4a78c3 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -40,16 +40,16 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) wxBitmap bmpMenu; bmpMenu = wxBitmap(from_u8(Slic3r::var("disk.png")), wxBITMAP_TYPE_PNG); m_btn_save_preset = new wxBitmapButton(panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); - m_btn_save_preset->SetBackgroundColour(color); + if (wxMSW) m_btn_save_preset->SetBackgroundColour(color); bmpMenu = wxBitmap(from_u8(Slic3r::var("delete.png")), wxBITMAP_TYPE_PNG); m_btn_delete_preset = new wxBitmapButton(panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); - m_btn_delete_preset->SetBackgroundColour(color); + if (wxMSW) m_btn_delete_preset->SetBackgroundColour(color); m_show_incompatible_presets = false; m_bmp_show_incompatible_presets = new wxBitmap(from_u8(Slic3r::var("flag-red-icon.png")), wxBITMAP_TYPE_PNG); m_bmp_hide_incompatible_presets = new wxBitmap(from_u8(Slic3r::var("flag-green-icon.png")), wxBITMAP_TYPE_PNG); m_btn_hide_incompatible_presets = new wxBitmapButton(panel, wxID_ANY, *m_bmp_hide_incompatible_presets, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); - m_btn_hide_incompatible_presets->SetBackgroundColour(color); + if (wxMSW) m_btn_hide_incompatible_presets->SetBackgroundColour(color); m_btn_save_preset->SetToolTip(_(L("Save current ")) + m_title); m_btn_delete_preset->SetToolTip(_(L("Delete this preset")));