Commit 0d8b5a6c authored by Nate Graham's avatar Nate Graham 🔩

[applet] Remove unnecessary ColumnLayout

It only had one thing in it; no need for it to exist.
parent 8525cf12
......@@ -496,149 +496,144 @@ Item {
}
}
ColumnLayout {
anchors.fill: parent
PlasmaExtras.ScrollArea {
id: scrollView
PlasmaExtras.ScrollArea {
id: scrollView
anchors.fill: parent
Layout.fillWidth: true
Layout.fillHeight: true
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
flickableItem.boundsBehavior: Flickable.StopAtBounds;
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
flickableItem.boundsBehavior: Flickable.StopAtBounds;
//our scroll isn't a list of delegates, all internal items are tab focussable, making this redundant
activeFocusOnTab: false
//our scroll isn't a list of delegates, all internal items are tab focussable, making this redundant
activeFocusOnTab: false
Item {
width: streamsView.visible ? streamsView.width : devicesView.width
height: streamsView.visible ? streamsView.height : devicesView.height
Item {
width: streamsView.visible ? streamsView.width : devicesView.width
height: streamsView.visible ? streamsView.height : devicesView.height
ColumnLayout {
id: streamsView
spacing: 0
visible: tabBar.currentTab == streamsTab
property int maximumWidth: scrollView.viewport.width
width: maximumWidth
Layout.maximumWidth: maximumWidth
ColumnLayout {
id: streamsView
spacing: 0
visible: tabBar.currentTab == streamsTab
property int maximumWidth: scrollView.viewport.width
width: maximumWidth
Layout.maximumWidth: maximumWidth
ListView {
id: sinkInputView
ListView {
id: sinkInputView
Layout.fillWidth: true
Layout.minimumHeight: contentHeight
Layout.maximumHeight: contentHeight
Layout.fillWidth: true
Layout.minimumHeight: contentHeight
Layout.maximumHeight: contentHeight
model: PulseObjectFilterModel {
filters: [ { role: "VirtualStream", value: false } ]
sourceModel: SinkInputModel {}
}
boundsBehavior: Flickable.StopAtBounds;
delegate: StreamListItem {
type: "sink-input"
draggable: sinkView.count > 1
}
model: PulseObjectFilterModel {
filters: [ { role: "VirtualStream", value: false } ]
sourceModel: SinkInputModel {}
}
PlasmaCore.SvgItem {
elementId: "horizontal-line"
Layout.preferredWidth: scrollView.viewport.width - PlasmaCore.Units.smallSpacing * 4
Layout.preferredHeight: naturalSize.height
Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2
Layout.rightMargin: PlasmaCore.Units.smallSpacing * 2
Layout.topMargin: PlasmaCore.Units.smallSpacing
svg: lineSvg
visible: sinkInputView.model.count > 0 && sourceOutputView.model.count > 0
boundsBehavior: Flickable.StopAtBounds;
delegate: StreamListItem {
type: "sink-input"
draggable: sinkView.count > 1
}
}
ListView {
id: sourceOutputView
PlasmaCore.SvgItem {
elementId: "horizontal-line"
Layout.preferredWidth: scrollView.viewport.width - PlasmaCore.Units.smallSpacing * 4
Layout.preferredHeight: naturalSize.height
Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2
Layout.rightMargin: PlasmaCore.Units.smallSpacing * 2
Layout.topMargin: PlasmaCore.Units.smallSpacing
svg: lineSvg
visible: sinkInputView.model.count > 0 && sourceOutputView.model.count > 0
}
Layout.fillWidth: true
Layout.minimumHeight: contentHeight
Layout.maximumHeight: contentHeight
ListView {
id: sourceOutputView
model: PulseObjectFilterModel {
filters: [ { role: "VirtualStream", value: false } ]
sourceModel: SourceOutputModel {}
}
boundsBehavior: Flickable.StopAtBounds;
delegate: StreamListItem {
type: "source-input"
draggable: sourceView.count > 1
}
Layout.fillWidth: true
Layout.minimumHeight: contentHeight
Layout.maximumHeight: contentHeight
model: PulseObjectFilterModel {
filters: [ { role: "VirtualStream", value: false } ]
sourceModel: SourceOutputModel {}
}
boundsBehavior: Flickable.StopAtBounds;
delegate: StreamListItem {
type: "source-input"
draggable: sourceView.count > 1
}
}
}
ColumnLayout {
id: devicesView
visible: tabBar.currentTab == devicesTab
property int maximumWidth: scrollView.viewport.width
width: maximumWidth
Layout.maximumWidth: maximumWidth
spacing: 0
ColumnLayout {
id: devicesView
visible: tabBar.currentTab == devicesTab
property int maximumWidth: scrollView.viewport.width
width: maximumWidth
Layout.maximumWidth: maximumWidth
spacing: 0
ListView {
id: sinkView
ListView {
id: sinkView
Layout.fillWidth: true
Layout.minimumHeight: contentHeight
Layout.maximumHeight: contentHeight
spacing: 0
Layout.fillWidth: true
Layout.minimumHeight: contentHeight
Layout.maximumHeight: contentHeight
spacing: 0
model: paSinkFilterModel
model: paSinkFilterModel
boundsBehavior: Flickable.StopAtBounds;
delegate: DeviceListItem {
type: "sink"
onlyone: sinkView.count === 1
}
boundsBehavior: Flickable.StopAtBounds;
delegate: DeviceListItem {
type: "sink"
onlyone: sinkView.count === 1
}
}
PlasmaCore.SvgItem {
id: devicesLine
elementId: "horizontal-line"
Layout.preferredWidth: scrollView.viewport.width - PlasmaCore.Units.smallSpacing * 4
Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2
Layout.rightMargin: Layout.leftMargin
Layout.topMargin: PlasmaCore.Units.smallSpacing
svg: lineSvg
visible: sinkView.model.count > 0 && sourceView.model.count > 0 && (sinkView.model.count > 1 || sourceView.model.count > 1)
}
PlasmaCore.SvgItem {
id: devicesLine
elementId: "horizontal-line"
Layout.preferredWidth: scrollView.viewport.width - PlasmaCore.Units.smallSpacing * 4
Layout.leftMargin: PlasmaCore.Units.smallSpacing * 2
Layout.rightMargin: Layout.leftMargin
Layout.topMargin: PlasmaCore.Units.smallSpacing
svg: lineSvg
visible: sinkView.model.count > 0 && sourceView.model.count > 0 && (sinkView.model.count > 1 || sourceView.model.count > 1)
}
ListView {
id: sourceView
ListView {
id: sourceView
Layout.fillWidth: true
Layout.minimumHeight: contentHeight
Layout.maximumHeight: contentHeight
Layout.fillWidth: true
Layout.minimumHeight: contentHeight
Layout.maximumHeight: contentHeight
model: paSourceFilterModel
model: paSourceFilterModel
boundsBehavior: Flickable.StopAtBounds;
delegate: DeviceListItem {
type: "source"
onlyone: sourceView.count === 1
}
boundsBehavior: Flickable.StopAtBounds;
delegate: DeviceListItem {
type: "source"
onlyone: sourceView.count === 1
}
}
}
PlasmaExtras.PlaceholderMessage {
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
anchors.centerIn: parent
visible: streamsView.visible && !sinkInputView.count && !sourceOutputView.count
text: i18n("No applications playing or recording audio")
}
}
PlasmaExtras.PlaceholderMessage {
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
anchors.centerIn: parent
visible: devicesView.visible && !sinkView.count && !sourceView.count
text: i18n("No output or input devices found")
}
PlasmaExtras.PlaceholderMessage {
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
anchors.centerIn: parent
visible: streamsView.visible && !sinkInputView.count && !sourceOutputView.count
text: i18n("No applications playing or recording audio")
}
PlasmaExtras.PlaceholderMessage {
width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
anchors.centerIn: parent
visible: devicesView.visible && !sinkView.count && !sourceView.count
text: i18n("No output or input devices found")
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment