diff --git a/src/widgets/ASlider.cpp b/src/widgets/ASlider.cpp index 00e0b2506..03b6291c4 100644 --- a/src/widgets/ASlider.cpp +++ b/src/widgets/ASlider.cpp @@ -1532,6 +1532,15 @@ void LWSlider::Refresh() mParent->Refresh(false); } +void LWSlider::Redraw() +{ + mBitmap.reset(); + mThumbBitmap.reset(); + mThumbBitmapHilited.reset(); + + Refresh(); +} + bool LWSlider::GetEnabled() const { return mEnabled; @@ -1616,6 +1625,18 @@ ASlider::~ASlider() ReleaseMouse(); } +bool ASlider::SetBackgroundColour(const wxColour& colour) +{ + auto res = wxPanel::SetBackgroundColour(colour); + + if (res && mLWSlider) + { + mLWSlider->Redraw(); + } + + return res; +} + void ASlider::OnSlider(wxCommandEvent &event) { diff --git a/src/widgets/ASlider.h b/src/widgets/ASlider.h index f50b2bddb..8b8d3b116 100644 --- a/src/widgets/ASlider.h +++ b/src/widgets/ASlider.h @@ -136,6 +136,7 @@ class LWSlider void OnMouseEvent(wxMouseEvent & event); void OnKeyDown(wxKeyEvent & event); void Refresh(); + void Redraw(); bool ShowDialog(); bool ShowDialog(wxPoint pos); @@ -146,8 +147,6 @@ class LWSlider float GetMinValue() const; float GetMaxValue() const; - static void DeleteSharedTipPanel(); - void SetParent(wxWindow *parent) { mParent = parent; } void SendUpdate(float newValue); @@ -272,6 +271,8 @@ class ASlider /* not final */ : public wxPanel void SetFocusFromKbd() override; + bool SetBackgroundColour(const wxColour& colour) override; + void GetScroll(float & line, float & page); void SetScroll(float line, float page);