mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-28 13:22:06 +00:00
FIX:change interface for send
jira:[none] Change-Id: Ia59bb1bb606399541aa191991ff0fb3f106d75d1 (cherry picked from commit b22af6cfe0a589ae5fa2e95a01ebe47f6742ee99)
This commit is contained in:
@@ -2,10 +2,13 @@
|
||||
|
||||
#include "../wxExtensions.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
RadioBox::RadioBox(wxWindow *parent)
|
||||
: wxBitmapToggleButton(parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE), m_on(this, "radio_on", 18), m_off(this, "radio_off", 18)
|
||||
: wxBitmapToggleButton(parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE)
|
||||
, m_on(this, "radio_on", 18)
|
||||
, m_off(this, "radio_off", 18)
|
||||
, m_ban(this, "radio_ban", 18)
|
||||
{
|
||||
// SetBackgroundStyle(wxBG_STYLE_TRANSPARENT);
|
||||
if (parent) SetBackgroundColour(parent->GetBackgroundColour());
|
||||
@@ -35,7 +38,16 @@ void RadioBox::Rescale()
|
||||
update();
|
||||
}
|
||||
|
||||
void RadioBox::update() { SetBitmap((GetValue() ? m_on : m_off).bmp()); }
|
||||
void RadioBox::update() {
|
||||
if (IsEnabled())
|
||||
{
|
||||
SetBitmap((GetValue() ? m_on : m_off).bmp());
|
||||
} else
|
||||
{
|
||||
SetBitmap(m_ban.bmp());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <wx/tglbtn.h>
|
||||
|
||||
namespace Slic3r {
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
class RadioBox : public wxBitmapToggleButton
|
||||
@@ -17,11 +17,11 @@ public:
|
||||
void SetValue(bool value) override;
|
||||
bool GetValue();
|
||||
void Rescale();
|
||||
bool Disable() {
|
||||
return wxBitmapToggleButton::Disable();
|
||||
bool Disable() {
|
||||
return wxBitmapToggleButton::Disable();
|
||||
}
|
||||
bool Enable() {
|
||||
return wxBitmapToggleButton::Enable();
|
||||
bool Enable() {
|
||||
return wxBitmapToggleButton::Enable();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -30,6 +30,7 @@ private:
|
||||
private:
|
||||
ScalableBitmap m_on;
|
||||
ScalableBitmap m_off;
|
||||
ScalableBitmap m_ban;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user