diff --git a/data/themes/default/fader_background.png b/data/themes/default/fader_background.png index 831668f2be8..7d6b59e35fe 100755 Binary files a/data/themes/default/fader_background.png and b/data/themes/default/fader_background.png differ diff --git a/data/themes/default/fader_leds.png b/data/themes/default/fader_leds.png index 45a0d81d603..707902e04c6 100755 Binary files a/data/themes/default/fader_leds.png and b/data/themes/default/fader_leds.png differ diff --git a/data/themes/default/style.css b/data/themes/default/style.css index 85c47984c96..51397fa0e0f 100755 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -544,8 +544,9 @@ FxLine { /* persistent peak markers for fx peak meters */ Fader { - qproperty-peakGreen: #0BD556; - qproperty-peakRed: #660505; + qproperty-peakGreen: #0ad45c; + qproperty-peakYellow: #d6ec52; + qproperty-peakRed: #c12038; } TimeLineWidget { diff --git a/include/Fader.h b/include/Fader.h index 35f9709541e..943761537b1 100644 --- a/include/Fader.h +++ b/include/Fader.h @@ -63,6 +63,7 @@ class EXPORT Fader : public QWidget, public FloatModelView public: Q_PROPERTY( QColor peakGreen READ peakGreen WRITE setPeakGreen ) Q_PROPERTY( QColor peakRed READ peakRed WRITE setPeakRed ) + Q_PROPERTY( QColor peakYellow READ peakYellow WRITE setPeakYellow ) Q_PROPERTY( bool levelsDisplayedInDBFS READ getLevelsDisplayedInDBFS WRITE setLevelsDisplayedInDBFS ) Fader( FloatModel * _model, const QString & _name, QWidget * _parent ); @@ -89,9 +90,12 @@ class EXPORT Fader : public QWidget, public FloatModelView QColor const & peakRed() const; void setPeakRed( const QColor & c ); + QColor const & peakYellow() const; + void setPeakYellow( const QColor & c ); + inline bool getLevelsDisplayedInDBFS() const { return m_levelsDisplayedInDBFS; } inline void setLevelsDisplayedInDBFS(bool value = true) { m_levelsDisplayedInDBFS = value; } - + void setDisplayConversion( bool b ) { m_displayConversion = b; @@ -113,7 +117,7 @@ class EXPORT Fader : public QWidget, public FloatModelView virtual void wheelEvent( QWheelEvent *ev ); virtual void paintEvent( QPaintEvent *ev ); - inline bool clips(float const & value) const { return value > 1.0f; } + inline bool clips(float const & value) const { return value >= 1.0f; } void paintDBFSLevels(QPaintEvent *ev, QPainter & painter); void paintLinearLevels(QPaintEvent *ev, QPainter & painter); @@ -161,6 +165,7 @@ class EXPORT Fader : public QWidget, public FloatModelView QColor m_peakGreen; QColor m_peakRed; + QColor m_peakYellow; } ; diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index 3884e9aff63..c4c2da9b796 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -283,8 +283,8 @@ FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv, tr( "FX Fader %1" ).arg( channelIndex ), m_fxLine ); m_fader->setLevelsDisplayedInDBFS(); // TODO dbvToAmp is really dBFSToAmp. Rename in later commit. - m_fader->setMinPeak(dbvToAmp(-40)); - m_fader->setMaxPeak(dbvToAmp(12)); + m_fader->setMinPeak(dbvToAmp(-42)); + m_fader->setMaxPeak(dbvToAmp(9)); m_fader->move( 16-m_fader->width()/2, m_fxLine->height()- @@ -600,8 +600,3 @@ void FxMixerView::updateFaders() } } } - - - - - diff --git a/src/gui/widgets/Fader.cpp b/src/gui/widgets/Fader.cpp index 2ef4c2e6241..ecb4759d344 100644 --- a/src/gui/widgets/Fader.cpp +++ b/src/gui/widgets/Fader.cpp @@ -79,7 +79,8 @@ Fader::Fader( FloatModel * _model, const QString & _name, QWidget * _parent ) : m_moveStartPoint( -1 ), m_startValue( 0 ), m_peakGreen( 0, 0, 0 ), - m_peakRed( 0, 0, 0 ) + m_peakRed( 0, 0, 0 ), + m_peakYellow( 0, 0, 0 ) { if( s_textFloat == NULL ) { @@ -384,9 +385,16 @@ void Fader::paintDBFSLevels(QPaintEvent * ev, QPainter & painter) float const persistentLeftPeakDBFS = ampToDbv(m_persistentPeak_L); int persistentPeak_L = height * (1 - (persistentLeftPeakDBFS - minDB) * fullSpanReciprocal); + // the LED's have a 4px padding and we don't want the peaks + // to draw on the fader background + if( persistentPeak_L <= 4 ) + { + persistentPeak_L = 4; + } if( persistentLeftPeakDBFS > minDB ) { - QColor const & peakColor = clips(m_persistentPeak_L) ? peakRed() : peakGreen(); + QColor const & peakColor = clips(m_persistentPeak_L) ? peakRed() : + persistentLeftPeakDBFS >= -6 ? peakYellow() : peakGreen(); painter.fillRect( QRect( 2, persistentPeak_L, 7, 1 ), peakColor ); } @@ -399,9 +407,16 @@ void Fader::paintDBFSLevels(QPaintEvent * ev, QPainter & painter) float const persistentRightPeakDBFS = ampToDbv(m_persistentPeak_R); int persistentPeak_R = height * (1 - (persistentRightPeakDBFS - minDB) * fullSpanReciprocal); + // the LED's have a 4px padding and we don't want the peaks + // to draw on the fader background + if( persistentPeak_R <= 4 ) + { + persistentPeak_R = 4; + } if( persistentRightPeakDBFS > minDB ) { - QColor const & peakColor = clips(m_persistentPeak_R) ? peakRed() : peakGreen(); + QColor const & peakColor = clips(m_persistentPeak_R) ? peakRed() : + persistentRightPeakDBFS >= -6 ? peakYellow() : peakGreen(); painter.fillRect( QRect( 14, persistentPeak_R, 7, 1 ), peakColor ); } } @@ -449,6 +464,11 @@ QColor const & Fader::peakRed() const return m_peakRed; } +QColor const & Fader::peakYellow() const +{ + return m_peakYellow; +} + void Fader::setPeakGreen( const QColor & c ) { m_peakGreen = c; @@ -459,5 +479,7 @@ void Fader::setPeakRed( const QColor & c ) m_peakRed = c; } - - +void Fader::setPeakYellow( const QColor & c ) +{ + m_peakYellow = c; +}