1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Bug 262 - Enh: Mixer Board: Track strip and border colours to match those in current TrackPanel

This commit is contained in:
James Crook 2018-04-12 14:13:31 +01:00
parent 0e25f65eb4
commit 8ff80bde11
2 changed files with 15 additions and 8 deletions

View File

@ -697,18 +697,23 @@ void MixerTrackCluster::OnMouseEvent(wxMouseEvent& event)
void MixerTrackCluster::OnPaint(wxPaintEvent & WXUNUSED(event))
{
auto selected = mTrack->GetSelected();
wxColour col = theTheme.Colour(selected ? clrTrackInfoSelected : clrTrackInfo) ;
SetBackgroundColour( col );
mMeter->SetBackgroundColour( col );
mSlider_Gain->SetBackgroundColour( col );
mSlider_Pan->SetBackgroundColour( col );
mStaticText_TrackName->SetBackgroundColour( col );
wxPaintDC dc(this);
#ifdef __WXMAC__
// Fill with correct color, not scroller background. Done automatically on Windows.
AColor::Medium(&dc, false);
dc.DrawRectangle(this->GetClientRect());
#endif
AColor::MediumTrackInfo(&dc, selected);
dc.DrawRectangle(this->GetClientRect());
wxSize clusterSize = this->GetSize();
wxRect bev(0, 0, clusterSize.GetWidth() - 1, clusterSize.GetHeight() - 1);
auto selected = mTrack->GetSelected();
for (unsigned int i = 0; i < 4; i++) // 4 gives a big bevel, but there were complaints about visibility otherwise.
{

View File

@ -265,6 +265,7 @@ MeterPanel::MeterPanel(AudacityProject *project,
wxColour backgroundColour = theTheme.Colour( clrMedium);
mBkgndBrush = wxBrush(backgroundColour, wxSOLID);
SetBackgroundColour( backgroundColour );
mPeakPeakPen = wxPen(theTheme.Colour( clrMeterPeak), 1, wxSOLID);
mDisabledPen = wxPen(theTheme.Colour( clrMeterDisabledPen), 1, wxSOLID);
@ -396,7 +397,7 @@ void MeterPanel::OnPaint(wxPaintEvent & WXUNUSED(event))
wxColour clrText = theTheme.Colour( clrTrackPanelText );
wxColour clrBoxFill = theTheme.Colour( clrMedium );
if (mLayoutValid == false)
if (mLayoutValid == false || (mStyle == MixerTrackCluster ))
{
// Create a NEW one using current size and select into the DC
mBitmap = std::make_unique<wxBitmap>();
@ -416,7 +417,8 @@ void MeterPanel::OnPaint(wxPaintEvent & WXUNUSED(event))
// mBkgndBrush.SetColour( GetParent()->GetBackgroundColour() );
//}
#endif
mBkgndBrush.SetColour( GetBackgroundColour() );
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(mBkgndBrush);
dc.DrawRectangle(0, 0, mWidth, mHeight);