diff --git a/src/kcm/package/contents/ui/DeviceListItem.qml b/src/kcm/package/contents/ui/DeviceListItem.qml --- a/src/kcm/package/contents/ui/DeviceListItem.qml +++ b/src/kcm/package/contents/ui/DeviceListItem.qml @@ -90,12 +90,16 @@ RowLayout { MuteButton { - Layout.topMargin: -(height - icon.height) / 2 + Layout.alignment: Qt.AlignTop + Layout.topMargin: -(height - volumeSlider.height) / 2 muted: Muted onCheckedChanged: Muted = checked } - VolumeSlider {} + VolumeSlider { + id: volumeSlider + Layout.alignment: Qt.AlignTop + } } } } diff --git a/src/kcm/package/contents/ui/StreamListItem.qml b/src/kcm/package/contents/ui/StreamListItem.qml --- a/src/kcm/package/contents/ui/StreamListItem.qml +++ b/src/kcm/package/contents/ui/StreamListItem.qml @@ -77,11 +77,16 @@ RowLayout { MuteButton { + Layout.alignment: Qt.AlignTop + Layout.topMargin: -(height - volumeSlider.height) / 2 muted: Muted onCheckedChanged: Muted = checked } - VolumeSlider {} + VolumeSlider { + id: volumeSlider + Layout.alignment: Qt.AlignTop + } } } } diff --git a/src/kcm/package/contents/ui/VolumeSlider.qml b/src/kcm/package/contents/ui/VolumeSlider.qml --- a/src/kcm/package/contents/ui/VolumeSlider.qml +++ b/src/kcm/package/contents/ui/VolumeSlider.qml @@ -39,6 +39,9 @@ property bool ignoreValueChange: true Layout.fillWidth: true + // Workaround: Slider has 2 extra pixels at the bottom, used for the tickmarks, which move it off-center. + Layout.bottomMargin: -Math.round(slider.implicitHeight / 11) + from: PulseAudio.MinimalVolume to: PulseAudio.MaximalVolume // TODO: implement a way to hide tickmarks