mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
ENH: [STUDIO-1477] indicators for that has object configs
Change-Id: I4556b049cd6aa128a05f69c00fa14d8ea5bb3f39
This commit is contained in:
parent
536df6ca23
commit
2f7946333d
7 changed files with 60 additions and 5 deletions
|
@ -33,6 +33,11 @@ void SwitchButton::SetTextColor(StateColor const& color)
|
|||
text_color = color;
|
||||
}
|
||||
|
||||
void SwitchButton::SetTextColor2(StateColor const &color)
|
||||
{
|
||||
text_color2 = color;
|
||||
}
|
||||
|
||||
void SwitchButton::SetTrackColor(StateColor const& color)
|
||||
{
|
||||
track_color = color;
|
||||
|
@ -116,7 +121,7 @@ void SwitchButton::Rescale()
|
|||
}
|
||||
memdc.SetTextForeground(text_color.colorForStates(state ^ StateColor::Checked));
|
||||
memdc.DrawText(labels[0], {BS + (thumbSize.x - textSize[0].x) / 2, BS + (thumbSize.y - textSize[0].y) / 2});
|
||||
memdc.SetTextForeground(text_color.colorForStates(state));
|
||||
memdc.SetTextForeground(text_color2.count() == 0 ? text_color.colorForStates(state) : text_color2.colorForStates(state));
|
||||
memdc.DrawText(labels[1], {trackSize.x - thumbSize.x - BS + (thumbSize.x - textSize[1].x) / 2, BS + (thumbSize.y - textSize[1].y) / 2});
|
||||
memdc.SelectObject(wxNullBitmap);
|
||||
#ifdef __WXOSX__
|
||||
|
|
|
@ -16,7 +16,9 @@ public:
|
|||
|
||||
void SetTextColor(StateColor const &color);
|
||||
|
||||
void SetTrackColor(StateColor const &color);
|
||||
void SetTextColor2(StateColor const &color);
|
||||
|
||||
void SetTrackColor(StateColor const &color);
|
||||
|
||||
void SetThumbColor(StateColor const &color);
|
||||
|
||||
|
@ -32,7 +34,8 @@ private:
|
|||
ScalableBitmap m_off;
|
||||
|
||||
wxString labels[2];
|
||||
StateColor text_color;
|
||||
StateColor text_color;
|
||||
StateColor text_color2;
|
||||
StateColor track_color;
|
||||
StateColor thumb_color;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue