Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warning color from oscilloscope #5492

Merged
merged 1 commit into from
Jul 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion data/themes/classic/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,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 @@ -195,7 +195,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