diff --git a/applet/contents/ui/DeviceListItem.qml b/applet/contents/ui/DeviceListItem.qml --- a/applet/contents/ui/DeviceListItem.qml +++ b/applet/contents/ui/DeviceListItem.qml @@ -27,17 +27,6 @@ property bool onlyOne: false draggable: false - label: { - if (!currentPort) { - return Description - } else { - if (onlyOne) { - return currentPort.description - } else { - return i18nc("label of device items", "%1 (%2)", currentPort.description, Description) - } - } - } - labelOpacity: onlyOne ? 1 : 0.6 + label: currentPort ? currentPort.description : Description icon: Icon.formFactorIcon(FormFactor) || IconName } 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 @@ -37,7 +37,6 @@ id: item property alias label: textLabel.text - property alias labelOpacity: textLabel.opacity property alias draggable: dragArea.enabled property alias icon: clientIcon.source property alias iconUsesPlasmaTheme: clientIcon.usesPlasmaTheme @@ -66,6 +65,7 @@ Layout.preferredHeight: column.height * 0.75 Layout.preferredWidth: Layout.preferredHeight source: "unknown" + visible: type === "sink-input" || type === "source-input" onSourceChanged: { if (!valid && source != "unknown") { @@ -112,12 +112,18 @@ RowLayout { Layout.fillWidth: true + PlasmaComponents3.RadioButton { + id: defaultButton + checked: PulseObject.default + visible: (type == "sink" && sinkView.model.count > 1) || (type == "source" && sourceView.model.count > 1) + onClicked: PulseObject.default = true; + } + PlasmaExtras.Heading { id: textLabel Layout.fillWidth: true height: undefined level: 5 - opacity: 0.6 wrapMode: Text.NoWrap elide: Text.ElideRight visible: !portbox.visible @@ -146,16 +152,6 @@ Layout.fillWidth: true } - PlasmaComponents3.ToolButton { - id: defaultButton - text: i18n("Default Device") - icon.name: PulseObject.default ? "starred-symbolic" : "non-starred-symbolic" - checkable: true - checked: PulseObject.default - visible: (type == "sink" && sinkView.model.count > 1) || (type == "source" && sourceView.model.count > 1) - onClicked: PulseObject.default = true; - } - SmallToolButton { id: contextMenuButton icon: "application-menu" diff --git a/applet/contents/ui/StreamListItem.qml b/applet/contents/ui/StreamListItem.qml --- a/applet/contents/ui/StreamListItem.qml +++ b/applet/contents/ui/StreamListItem.qml @@ -27,18 +27,7 @@ ListItemBase { property bool onlyOne: false - label: { - if (! Client) { - return Name - } else { - if (onlyOne) { - return Client.name - } else { - return i18nc("label of stream items", "%1 (%2)", Client.name, Name) - } - } - } - labelOpacity: onlyOne ? 1 : 0.6 + label: Client ? Client.name : Name icon: IconName iconUsesPlasmaTheme: false } diff --git a/applet/contents/ui/main.qml b/applet/contents/ui/main.qml --- a/applet/contents/ui/main.qml +++ b/applet/contents/ui/main.qml @@ -63,7 +63,16 @@ return i18n("Volume at %1%", volumePercent(sink.volume)); } } - Plasmoid.toolTipSubText: paSinkModel.preferredSink && !isDummyOutput(paSinkModel.preferredSink) ? paSinkModel.preferredSink.description : "" + Plasmoid.toolTipSubText: { + if (paSinkModel.preferredSink && !isDummyOutput(paSinkModel.preferredSink)) { + var port = paSinkModel.preferredSink.ports[paSinkModel.preferredSink.activePortIndex]; + if (port) { + return port.description + } + return paSinkModel.preferredSink.name + } + return "" + } function isDummyOutput(output) { return output && output.name === dummyOutputName; @@ -298,8 +307,13 @@ id: feedback } + PlasmaCore.Svg { + id: lineSvg + imagePath: "widgets/line" + } + Plasmoid.fullRepresentation: ColumnLayout { - spacing: units.smallSpacing + spacing: 0 Layout.minimumHeight: main.Layout.minimumHeight Layout.minimumWidth: main.Layout.minimumWidth @@ -343,16 +357,6 @@ text: i18n("Applications") } } - - PlasmaComponents.ToolButton { - Layout.alignment: Qt.AlignBottom - tooltip: plasmoid.action("configure").text - iconName: "configure" - Accessible.name: tooltip - onClicked: { - plasmoid.action("configure").trigger(); - } - } } PlasmaExtras.ScrollArea { @@ -379,11 +383,6 @@ width: maximumWidth Layout.maximumWidth: maximumWidth - Header { - Layout.fillWidth: true - visible: sinkInputView.count > 0 && !streamsView.simpleMode - text: i18n("Playback Streams") - } ListView { id: sinkInputView @@ -403,11 +402,14 @@ } } - Header { + PlasmaCore.SvgItem { + elementId: "horizontal-line" + Layout.topMargin: naturalSize.height Layout.fillWidth: true - visible: sourceOutputView.count > 0 && !streamsView.simpleMode - text: i18n("Recording Streams") + Layout.preferredHeight: naturalSize.height + svg: lineSvg } + ListView { id: sourceOutputView @@ -436,12 +438,6 @@ width: maximumWidth Layout.maximumWidth: maximumWidth - Header { - id: sinkViewHeader - Layout.fillWidth: true - visible: sinkView.count > 0 && !devicesView.simpleMode - text: i18n("Playback Devices") - } ListView { id: sinkView @@ -471,12 +467,14 @@ } } - Header { - id: sourceViewHeader + PlasmaCore.SvgItem { + elementId: "horizontal-line" + Layout.topMargin: naturalSize.height Layout.fillWidth: true - visible: sourceView.count > 0 && !devicesView.simpleMode - text: i18n("Recording Devices") + Layout.preferredHeight: naturalSize.height + svg: lineSvg } + ListView { id: sourceView @@ -522,6 +520,40 @@ } } } + + PlasmaCore.SvgItem { + elementId: "horizontal-line" + Layout.fillWidth: true + Layout.preferredHeight: naturalSize.height + svg: lineSvg + } + + RowLayout { + spacing: units.smallSpacing + Layout.fillWidth: true + + PlasmaComponents.CheckBox { + id: raiseMaximumVolumeCheckbox + Layout.alignment: Qt.AlignLeft + } + + PlasmaExtras.Heading { + Layout.fillWidth: true + level: 5 + text: i18n("Raise maximum volume") + elide: Text.ElideRight + } + + PlasmaComponents.ToolButton { + Layout.alignment: Qt.AlignRight + tooltip: plasmoid.action("configure").text + iconName: "configure" + Accessible.name: tooltip + onClicked: { + plasmoid.action("configure").trigger(); + } + } + } } Component.onCompleted: {