Skip to content

Commit

Permalink
Remove warning color from oscilloscope (#5492)
Browse files Browse the repository at this point in the history
  • Loading branch information
husamalhomsi authored Jul 11, 2020
1 parent 2da0aaa commit d0ef875
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
1 change: 0 additions & 1 deletion data/themes/classic/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ Oscilloscope {
background: none;
border: none;
qproperty-normalColor: rgb(71, 253, 133);
qproperty-warningColor: rgb(255, 192, 64);
qproperty-clippingColor: rgb(255, 64, 64);
}

Expand Down
1 change: 0 additions & 1 deletion data/themes/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ Oscilloscope {
background: none;
border: none;
qproperty-normalColor: rgb(71, 253, 133);
qproperty-warningColor: rgb(255, 192, 64);
qproperty-clippingColor: rgb(255, 64, 64);
}

Expand Down
5 changes: 0 additions & 5 deletions include/Oscilloscope.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class Oscilloscope : public QWidget
Q_OBJECT
public:
Q_PROPERTY( QColor normalColor READ normalColor WRITE setNormalColor )
Q_PROPERTY( QColor warningColor READ warningColor WRITE setWarningColor )
Q_PROPERTY( QColor clippingColor READ clippingColor WRITE setClippingColor )

Oscilloscope( QWidget * _parent );
Expand All @@ -48,9 +47,6 @@ class Oscilloscope : public QWidget
QColor const & normalColor() const;
void setNormalColor(QColor const & normalColor);

QColor const & warningColor() const;
void setWarningColor(QColor const & warningColor);

QColor const & clippingColor() const;
void setClippingColor(QColor const & clippingColor);

Expand All @@ -74,7 +70,6 @@ protected slots:
bool m_active;

QColor m_normalColor;
QColor m_warningColor;
QColor m_clippingColor;
} ;

Expand Down
17 changes: 1 addition & 16 deletions src/gui/widgets/Oscilloscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Oscilloscope::Oscilloscope( QWidget * _p ) :
m_points( new QPointF[Engine::mixer()->framesPerPeriod()] ),
m_active( false ),
m_normalColor(71, 253, 133),
m_warningColor(255, 192, 64),
m_clippingColor(255, 64, 64)
{
setFixedSize( m_background.width(), m_background.height() );
Expand Down Expand Up @@ -121,16 +120,6 @@ void Oscilloscope::setNormalColor(QColor const & normalColor)
m_normalColor = normalColor;
}

QColor const & Oscilloscope::warningColor() const
{
return m_warningColor;
}

void Oscilloscope::setWarningColor(QColor const & warningColor)
{
m_warningColor = warningColor;
}

QColor const & Oscilloscope::clippingColor() const
{
return m_clippingColor;
Expand Down Expand Up @@ -205,14 +194,10 @@ void Oscilloscope::mousePressEvent( QMouseEvent * _me )

QColor const & Oscilloscope::determineLineColor(float level) const
{
if( level < 0.9f )
if( level <= 1.0f )
{
return normalColor();
}
else if( level <= 1.0f )
{
return warningColor();
}
else
{
return clippingColor();
Expand Down

0 comments on commit d0ef875

Please sign in to comment.