kdeconnect-kde/app/qml/volume.qml

56 lines
1.3 KiB
QML
Raw Permalink Normal View History

/*
* SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella@gmx.de>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
import QtQuick 2.2
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1
import org.kde.kirigami 2.0 as Kirigami
import org.kde.kdeconnect 1.0
Kirigami.Page
{
id: root
title: i18nd("kdeconnect-app", "Volume control")
property QtObject pluginInterface
ListView {
id: sinkList
anchors.fill: parent
spacing: Kirigami.Units.largeSpacing
model: RemoteSinksModel {
deviceId: pluginInterface.deviceId
}
delegate: ColumnLayout {
width: parent.width
Label {
text: description
2020-03-15 21:09:31 +00:00
elide: Text.ElideRight
Layout.fillWidth: true
}
RowLayout {
Button {
icon.name: muted ? "player-volume-muted" : "player-volume"
2020-08-06 23:08:31 +01:00
onClicked: muted = !muted
}
Slider {
Layout.fillWidth: true
from: 0
value: volume
to: maxVolume
2020-08-06 23:08:31 +01:00
onMoved: volume = value
}
}
}
}
}