diff --git a/src/kcm/package/contents/ui/Advanced.qml b/src/kcm/package/contents/ui/Advanced.qml --- a/src/kcm/package/contents/ui/Advanced.qml +++ b/src/kcm/package/contents/ui/Advanced.qml @@ -37,7 +37,7 @@ Header { Layout.fillWidth: true - enabled: 0 < view.count + enabled: view.count > 0 text: i18n("Device Profiles") disabledText: i18nc("@label", "No Device Profiles Available") } @@ -57,27 +57,28 @@ Layout.fillWidth: true text: i18n("Advanced Output Configuration") } + ModuleManager { id: moduleManager } + CheckBox { Layout.fillWidth: true Layout.topMargin: units.smallSpacing Layout.leftMargin: units.gridUnit / 2 Layout.rightMargin: units.gridUnit / 2 - width: parent.width text: i18n("Add virtual output device for simultaneous output on all local sound cards") checked: moduleManager.combineSinks onCheckedChanged: moduleManager.combineSinks = checked; } + CheckBox { Layout.fillWidth: true Layout.leftMargin: units.gridUnit / 2 Layout.rightMargin: units.gridUnit / 2 text: i18n("Automatically switch all running streams when a new output becomes available") checked: moduleManager.switchOnConnect onCheckedChanged: moduleManager.switchOnConnect = checked; } - } } diff --git a/src/kcm/package/contents/ui/Applications.qml b/src/kcm/package/contents/ui/Applications.qml --- a/src/kcm/package/contents/ui/Applications.qml +++ b/src/kcm/package/contents/ui/Applications.qml @@ -37,22 +37,19 @@ }); } - property bool appsPlayingAudio: eventStreamView.visible || sinkInputView.visible - Header { - enabled: parent.appsPlayingAudio + Layout.fillWidth: true + enabled: eventStreamView.count || sinkInputView.count text: i18n("Playback") disabledText: i18nc("@label", "No Applications Playing Audio") } ListView { id: eventStreamView Layout.fillWidth: true - Layout.minimumHeight: contentHeight - Layout.maximumHeight: contentHeight + Layout.preferredHeight: contentHeight Layout.margins: units.gridUnit / 2 interactive: false - visible: count > 0 spacing: units.largeSpacing model: PulseObjectFilterModel { filters: [ { role: "Name", value: "sink-input-by-media-role:event" } ] @@ -66,11 +63,9 @@ ListView { id: sinkInputView Layout.fillWidth: true - Layout.minimumHeight: contentHeight - Layout.maximumHeight: contentHeight + Layout.preferredHeight: contentHeight Layout.margins: units.gridUnit / 2 interactive: false - visible: count > 0 spacing: units.largeSpacing model: PulseObjectFilterModel { filters: [ { role: "VirtualStream", value: false } ] @@ -83,13 +78,18 @@ Header { Layout.fillWidth: true - enabled: capturestreams.count > 0 + enabled: sourceOutputView.count > 0 text: i18n("Capture") disabledText: i18nc("@label", "No Applications Recording Audio") } ListView { - id: capturestreams + id: sourceOutputView + Layout.fillWidth: true + Layout.preferredHeight: contentHeight + Layout.margins: units.gridUnit / 2 + interactive: false + spacing: units.largeSpacing model: PulseObjectFilterModel { filters: [ { role: "VirtualStream", value: false } ] sourceModel: SourceOutputModel {} @@ -99,6 +99,5 @@ deviceModel: sourceModel } } - } } diff --git a/src/kcm/package/contents/ui/Devices.qml b/src/kcm/package/contents/ui/Devices.qml --- a/src/kcm/package/contents/ui/Devices.qml +++ b/src/kcm/package/contents/ui/Devices.qml @@ -35,7 +35,7 @@ Header { Layout.fillWidth: true - enabled: 0 < sinks.count + enabled: sinks.count > 0 text: i18n("Outputs") disabledText: i18nc("@label", "No Output Devices Available") } diff --git a/src/kcm/package/contents/ui/Header.qml b/src/kcm/package/contents/ui/Header.qml --- a/src/kcm/package/contents/ui/Header.qml +++ b/src/kcm/package/contents/ui/Header.qml @@ -30,8 +30,8 @@ Item { Layout.fillWidth: true + Layout.preferredHeight: units.gridUnit * 1.5 Layout.topMargin: units.smallSpacing - height: units.gridUnit * 1.5 PlasmaComponents.Label { id: heading @@ -43,7 +43,7 @@ Label { id: disabledLabel Layout.alignment: Qt.AlignCenter - visible: text != "" && !parent.enabled + visible: text && !parent.enabled font.italic: true } }