Delete background color changing (except of MSW)

This commit is contained in:
YuSanka 2018-03-06 13:34:39 +01:00
parent d0d83526b4
commit 254e311593
4 changed files with 10 additions and 10 deletions

View File

@ -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(); }));

View File

@ -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;

View File

@ -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 {

View File

@ -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")));