summaryrefslogtreecommitdiffstats
path: root/src/widget/wdisplay.cpp
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2014-01-03 16:21:55 -0500
committerRJ Ryan <rryan@mixxx.org>2014-01-03 16:23:45 -0500
commit328d5958483ceb33cee74def6c947111182b5af0 (patch)
tree1d82423bca2822d6d3de746e64fa91ad5a346186 /src/widget/wdisplay.cpp
parentb01e2033e72df806e6ee23299cb42435322e4ea1 (diff)
Normalize potmeter widget values to [0.0, 1.0] instead of [0.0, 127.0].
This is another step towards getting rid of MIDI assumptions that are baked into the widget system. * Control parameter space for potmeters is now [0.0, 1.0] instead of [0.0, 127.0]. * Non-linearity of parameter space (64 being the center value) now only applies to MIDI, not widgets. * Fix all potmeter-style widgets to use [0.0, 1.0] for parameter values.
Diffstat (limited to 'src/widget/wdisplay.cpp')
-rw-r--r--src/widget/wdisplay.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp
index 0d8bbf9cb5..7c325e598a 100644
--- a/src/widget/wdisplay.cpp
+++ b/src/widget/wdisplay.cpp
@@ -108,8 +108,7 @@ void WDisplay::setPixmap(QVector<PaintablePointer>* pPixmaps, int iPos,
}
int WDisplay::getActivePixmapIndex() const {
- return static_cast<int>(
- m_value * static_cast<double>(m_pixmaps.size()) / 128.0);
+ return static_cast<int>(m_value * m_pixmaps.size());
}
void WDisplay::paintEvent(QPaintEvent* ) {