diff --git a/applet/contents/ui/ListItemBase.qml b/applet/contents/ui/ListItemBase.qml --- a/applet/contents/ui/ListItemBase.qml +++ b/applet/contents/ui/ListItemBase.qml @@ -53,7 +53,8 @@ height: column.height RowLayout { - id: rowLayout + id: controlsRow + spacing: units.smallSpacing anchors.left: parent.left anchors.right: parent.right @@ -108,27 +109,32 @@ spacing: 0 RowLayout { - Layout.minimumHeight: contextMenuButton.height + Layout.minimumHeight: contextMenuButton.implicitHeight PlasmaComponents3.RadioButton { id: defaultButton + // Maximum width of the button need to match the text. Empty area must not change the default device. + Layout.maximumWidth: controlsRow.width - Layout.leftMargin - Layout.rightMargin + - (contextMenuButton.visible ? contextMenuButton.implicitWidth + units.smallSpacing * 2 : 0) Layout.leftMargin: LayoutMirroring.enabled ? 0 : Math.round((muteButton.width - defaultButton.indicator.width) / 2) Layout.rightMargin: LayoutMirroring.enabled ? Math.round((muteButton.width - defaultButton.indicator.width) / 2) : 0 spacing: units.smallSpacing + Math.round((muteButton.width - defaultButton.indicator.width) / 2) checked: PulseObject.default ? PulseObject.default : false visible: (type == "sink" && sinkView.model.count > 1) || (type == "source" && sourceView.model.count > 1) onClicked: PulseObject.default = true; } - Label { + PlasmaComponents3.Label { id: soloLabel + Layout.fillWidth: true text: defaultButton.text visible: !defaultButton.visible elide: Text.ElideRight } Item { Layout.fillWidth: true + visible: contextMenuButton.visble } SmallToolButton {