Skip to content

Commit

Permalink
remove unused MeterDisabledBrush
Browse files Browse the repository at this point in the history
  • Loading branch information
LWinterberg committed Apr 9, 2024
1 parent 3935acf commit f3d819d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
LabelTrackText: #000000;
MeterPeak: #6666ff;
MeterDisabledPen: #c0c0c0;
MeterDisabledBrush: #a0a0a0;
MeterInputPen: #cc4646;
MeterInputBrush: #cc4646;
MeterInputRMSBrush: #ff6666;
Expand Down
1 change: 0 additions & 1 deletion libraries/lib-theme-resources/dark/Components/Colors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
LabelTrackText: #000000;
MeterPeak: #6666ff;
MeterDisabledPen: #c0c0c0;
MeterDisabledBrush: #a0a0a0;
MeterInputPen: #cc4646;
MeterInputBrush: #cc4646;
MeterInputRMSBrush: #ff6666;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
LabelTrackText: #000000;
MeterPeak: #6666ff;
MeterDisabledPen: #c0c0c0;
MeterDisabledBrush: #a0a0a0;
MeterInputPen: #cc4646;
MeterInputBrush: #cc4646;
MeterInputRMSBrush: #ff6666;
Expand Down
1 change: 0 additions & 1 deletion libraries/lib-theme-resources/light/Components/Colors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
LabelTrackText: #000000;
MeterPeak: #6666ff;
MeterDisabledPen: #c0c0c0;
MeterDisabledBrush: #a0a0a0;
MeterInputPen: #cc4646;
MeterInputBrush: #cc4646;
MeterInputRMSBrush: #ff6666;
Expand Down
1 change: 0 additions & 1 deletion libraries/lib-theme/AllThemeResources.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ from there. Audacity will look for a file called "Pause.png".

DEFINE_COLOUR( clrMeterPeak, wxColour(102, 102, 255), wxT("MeterPeak"));
DEFINE_COLOUR( clrMeterDisabledPen, wxColour(192, 192, 192), wxT("MeterDisabledPen"));
DEFINE_COLOUR( clrMeterDisabledBrush, wxColour(160, 160, 160), wxT("MeterDisabledBrush"));

DEFINE_COLOUR( clrMeterInputPen, wxColour(204, 70, 70), wxT("MeterInputPen") );
DEFINE_COLOUR( clrMeterInputBrush, wxColour(204, 70, 70), wxT("MeterInputBrush") );
Expand Down
14 changes: 5 additions & 9 deletions src/widgets/MeterPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@ MeterPanel::MeterPanel(AudacityProject *project,
// mDarkPen = wxPen( theTheme.Colour( clrMeterOutputDarkPen ), 1, wxSOLID);
}

// mDisabledBkgndBrush = wxBrush(theTheme.Colour( clrMeterDisabledBrush), wxSOLID);
// No longer show a difference in the background colour when not monitoring.
// We have the tip instead.
mDisabledBkgndBrush = mBkgndBrush;

mTipTimer.SetOwner(this, OnTipTimeoutID);
mTimer.SetOwner(this, OnMeterUpdateID);
Expand Down Expand Up @@ -1721,7 +1717,7 @@ void MeterPanel::DrawMeterBar(wxDC &dc, MeterBar *bar)
// Draw the peak level
// +/-1 to include the peak position
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(mMeterDisabled ? mDisabledBkgndBrush : mBrush);
dc.SetBrush(mBrush);
if (ht)
{
dc.DrawRectangle(x, y + h - ht - 1, w, ht + 1);
Expand All @@ -1747,7 +1743,7 @@ void MeterPanel::DrawMeterBar(wxDC &dc, MeterBar *bar)

// Draw the RMS level
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(mMeterDisabled ? mDisabledBkgndBrush : mRMSBrush);
dc.SetBrush(mRMSBrush);
if (ht)
{
dc.DrawRectangle(x, y + h - ht - 1, w, ht + 1);
Expand Down Expand Up @@ -1782,7 +1778,7 @@ void MeterPanel::DrawMeterBar(wxDC &dc, MeterBar *bar)
// Draw the peak level
// +1 to include peak position
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(mMeterDisabled ? mDisabledBkgndBrush : mBrush);
dc.SetBrush(mBrush);
if (wd)
{
dc.DrawRectangle(x, y, wd + 1, h);
Expand All @@ -1808,7 +1804,7 @@ void MeterPanel::DrawMeterBar(wxDC &dc, MeterBar *bar)
// Draw the rms level
// +1 to include the rms position
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(mMeterDisabled ? mDisabledBkgndBrush : mRMSBrush);
dc.SetBrush(mRMSBrush);
if (wd)
{
dc.DrawRectangle(x, y, wd + 1, h);
Expand Down Expand Up @@ -1840,7 +1836,7 @@ void MeterPanel::DrawMeterBar(wxDC &dc, MeterBar *bar)
}
else
{
dc.SetBrush(mMeterDisabled ? mDisabledBkgndBrush : mBkgndBrush);
dc.SetBrush(mBkgndBrush);
}
dc.SetPen(*wxTRANSPARENT_PEN);
wxRect r(bar->rClip.GetX() + 1,
Expand Down

0 comments on commit f3d819d

Please sign in to comment.