From 86313160e6a340b68f361159ce5c8b99b5dad412 Mon Sep 17 00:00:00 2001 From: Paul Giblock Date: Wed, 28 Jan 2009 14:41:10 +0000 Subject: [PATCH] Fix gray envelope/LFO bug git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1982 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 3 +++ src/gui/widgets/envelope_and_lfo_view.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 601c80b52..61c924e2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,9 @@ - Begin themeing widgets with the new LmmsStyle interface - Minor tweaks and code style improvements + * src/gui/widgets/envelope_and_lfo_view.cpp: + Fix backwards Color-to-gray in env and LFO graphs + 2009-01-26 Paul Giblock * src/tracks/bb_track.cpp: diff --git a/src/gui/widgets/envelope_and_lfo_view.cpp b/src/gui/widgets/envelope_and_lfo_view.cpp index 213245a5c..3a9bd1ab9 100644 --- a/src/gui/widgets/envelope_and_lfo_view.cpp +++ b/src/gui/widgets/envelope_and_lfo_view.cpp @@ -429,7 +429,7 @@ void envelopeAndLFOView::paintEvent( QPaintEvent * ) LmmsStyle * style = engine::getLmmsStyle(); QColor lineColor = style->color(LmmsStyle::StandardGraphLine); - const float gray_amount = 1.0f - fabsf( m_amountKnob->value() ); + const float gray_amount = fabsf( m_amountKnob->value() ); p.setPen( QPen( QColor::fromHsvF( lineColor.hueF(), @@ -494,7 +494,7 @@ void envelopeAndLFOView::paintEvent( QPaintEvent * ) const float framesForGraph = SECS_PER_LFO_OSCILLATION * engine::getMixer()->baseSampleRate() / 10; - const float lfoGrayAmount = 1.0f - fabsf( m_lfoAmountKnob->value() ); + const float lfoGrayAmount = fabsf( m_lfoAmountKnob->value() ); p.setPen( QPen( QColor::fromHsvF( lineColor.hueF(), lineColor.saturationF() * lfoGrayAmount,