summaryrefslogtreecommitdiffstats
path: root/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml
diff options
context:
space:
mode:
Diffstat (limited to 'res/qml/Mixxx/Controls/WaveformOverviewMarker.qml')
-rw-r--r--res/qml/Mixxx/Controls/WaveformOverviewMarker.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml b/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml
index 509614d228..4f20bc4e55 100644
--- a/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml
+++ b/res/qml/Mixxx/Controls/WaveformOverviewMarker.qml
@@ -1,6 +1,7 @@
import Mixxx 0.1 as Mixxx
import QtQuick 2.12
import QtQuick.Shapes 1.12
+import QtQuick.Window 2.12
Item {
id: root
@@ -42,7 +43,10 @@ Item {
group: root.group
key: root.key
- onValueChanged: marker.x = parent.width * value
+ onValueChanged: {
+ // Math.round saves tons of CPU by avoiding redrawing for fractional pixel positions.
+ marker.x = Math.round(parent.width * value * Screen.devicePixelRatio) / Screen.devicePixelRatio;
+ }
}
}