1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 08:09:41 +02:00

Bug 2694 - Coloring of tracks in Mixer Board are awry

This commit is contained in:
Leland Lucius 2021-04-02 01:11:44 -05:00
parent 988e90ea54
commit 811065cff4
2 changed files with 24 additions and 2 deletions

View File

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

View File

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