diff --git a/resources/images/check_half_focused.svg b/resources/images/check_half_focused.svg new file mode 100644 index 000000000..ad3f4c101 --- /dev/null +++ b/resources/images/check_half_focused.svg @@ -0,0 +1,4 @@ + + + + diff --git a/resources/images/check_off.svg b/resources/images/check_off.svg index 601a44277..cf58fbc94 100644 --- a/resources/images/check_off.svg +++ b/resources/images/check_off.svg @@ -1,4 +1,3 @@ - - - - \ No newline at end of file + + + diff --git a/resources/images/check_off_focused.svg b/resources/images/check_off_focused.svg new file mode 100644 index 000000000..df7882478 --- /dev/null +++ b/resources/images/check_off_focused.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/images/check_on.svg b/resources/images/check_on.svg index 4ecbf2705..83a78da28 100644 --- a/resources/images/check_on.svg +++ b/resources/images/check_on.svg @@ -1,5 +1,4 @@ - - - - - \ No newline at end of file + + + + diff --git a/resources/images/check_on_focused.svg b/resources/images/check_on_focused.svg new file mode 100644 index 000000000..379f61b65 --- /dev/null +++ b/resources/images/check_on_focused.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/slic3r/GUI/Widgets/CheckBox.cpp b/src/slic3r/GUI/Widgets/CheckBox.cpp index aec46c337..928782099 100644 --- a/src/slic3r/GUI/Widgets/CheckBox.cpp +++ b/src/slic3r/GUI/Widgets/CheckBox.cpp @@ -4,12 +4,15 @@ CheckBox::CheckBox(wxWindow* parent) : wxBitmapToggleButton(parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE) - , m_on(this, "check_on", 16) - , m_half(this, "check_half", 16) - , m_off(this, "check_off", 16) - , m_on_disabled(this, "check_on_disabled", 16) - , m_half_disabled(this, "check_half_disabled", 16) - , m_off_disabled(this, "check_off_disabled", 16) + , m_on(this, "check_on", 18) + , m_half(this, "check_half", 18) + , m_off(this, "check_off", 18) + , m_on_disabled(this, "check_on_disabled", 18) + , m_half_disabled(this, "check_half_disabled", 18) + , m_off_disabled(this, "check_off_disabled", 18) + , m_on_focused(this, "check_on_focused", 18) + , m_half_focused(this, "check_half_focused", 18) + , m_off_focused(this, "check_off_focused", 18) { //SetBackgroundStyle(wxBG_STYLE_TRANSPARENT); if (parent) @@ -42,6 +45,10 @@ void CheckBox::Rescale() void CheckBox::update() { - SetBitmap((m_half_checked ? m_half : GetValue() ? m_on : m_off).bmp()); + SetBitmapLabel((m_half_checked ? m_half : GetValue() ? m_on : m_off).bmp()); SetBitmapDisabled((m_half_checked ? m_half_disabled : GetValue() ? m_on_disabled : m_off_disabled).bmp()); + SetBitmapFocus((m_half_checked ? m_half_focused : GetValue() ? m_on_focused : m_off_focused).bmp()); + SetBitmapCurrent((m_half_checked ? m_half_focused : GetValue() ? m_on_focused : m_off_focused).bmp()); } + +CheckBox::State CheckBox::GetNormalState() const { return State_Normal; } diff --git a/src/slic3r/GUI/Widgets/CheckBox.hpp b/src/slic3r/GUI/Widgets/CheckBox.hpp index 69d0e0e7d..6d6451a71 100644 --- a/src/slic3r/GUI/Widgets/CheckBox.hpp +++ b/src/slic3r/GUI/Widgets/CheckBox.hpp @@ -17,6 +17,9 @@ public: void Rescale(); +protected: + virtual State GetNormalState() const wxOVERRIDE; + private: void update(); @@ -27,6 +30,9 @@ private: ScalableBitmap m_on_disabled; ScalableBitmap m_half_disabled; ScalableBitmap m_off_disabled; + ScalableBitmap m_on_focused; + ScalableBitmap m_half_focused; + ScalableBitmap m_off_focused; bool m_half_checked = false; };