Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/VolumeSlider.qml
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 70 | if (!pressed) { | |||
---|---|---|---|---|---|
74 | // whereas PA rejected the volume change and is | 74 | // whereas PA rejected the volume change and is | ||
75 | // still at v15 (e.g.). | 75 | // still at v15 (e.g.). | ||
76 | updateTimer.restart(); | 76 | updateTimer.restart(); | ||
77 | } | 77 | } | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | Label { | 80 | Label { | ||
81 | id: hundredPercentLabel | 81 | id: hundredPercentLabel | ||
82 | readonly property real hundredPos: (slider.width / slider.maximumValue) * PulseAudio.NormalVolume | ||||
82 | z: slider.z - 1 | 83 | z: slider.z - 1 | ||
83 | x: (slider.width / slider.maximumValue) * PulseAudio.NormalVolume - width / 2 | 84 | x: (Qt.application.layoutDirection == Qt.RightToLeft ? slider.width - hundredPos : hundredPos) - width / 2 | ||
84 | y: slider.height / 1.2 | 85 | y: slider.height / 1.2 | ||
85 | opacity: 0.5 | 86 | opacity: 0.5 | ||
86 | font.pixelSize: slider.height / 2.2 | 87 | font.pixelSize: slider.height / 2.2 | ||
87 | text: i18n("100%") | 88 | text: i18n("100%") | ||
88 | } | 89 | } | ||
89 | 90 | | |||
90 | Timer { | 91 | Timer { | ||
91 | id: updateTimer | 92 | id: updateTimer | ||
Show All 20 Lines |