Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/DeviceListItem.qml
Show All 19 Lines | |||||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | import QtQuick 2.0 | 22 | import QtQuick 2.0 | ||
23 | import QtQuick.Controls 2.0 | 23 | import QtQuick.Controls 2.0 | ||
24 | import QtQuick.Layouts 1.0 | 24 | import QtQuick.Layouts 1.0 | ||
25 | 25 | | |||
26 | import org.kde.kirigami 2.5 as Kirigami | 26 | import org.kde.kirigami 2.5 as Kirigami | ||
27 | import org.kde.plasma.private.volume 0.1 | 27 | import org.kde.plasma.private.volume 0.1 | ||
28 | import "../code/icon.js" as Icon | ||||
28 | 29 | | |||
29 | ColumnLayout { | 30 | ColumnLayout { | ||
30 | id: delegate | 31 | id: delegate | ||
31 | width: parent.width | 32 | width: parent.width | ||
32 | 33 | | |||
33 | property bool isPlayback: type.substring(0, 4) == "sink" | 34 | property bool isPlayback: type.substring(0, 4) == "sink" | ||
34 | 35 | | |||
35 | readonly property var currentPort: Ports[ActivePortIndex] | 36 | readonly property var currentPort: Ports[ActivePortIndex] | ||
36 | 37 | | |||
37 | RowLayout { | 38 | RowLayout { | ||
38 | Kirigami.Icon { | 39 | Kirigami.Icon { | ||
39 | Layout.alignment: Qt.AlignHCenter | 40 | Layout.alignment: Qt.AlignHCenter | ||
40 | Layout.preferredHeight: delegateColumn.height * 0.75 | 41 | Layout.preferredHeight: delegateColumn.height * 0.75 | ||
41 | Layout.preferredWidth: Layout.preferredHeight | 42 | Layout.preferredWidth: Layout.preferredHeight | ||
42 | source: IconName || "audio-card" | 43 | source: Icon.formFactorIcon(FormFactor) || IconName || "audio-card" | ||
43 | } | 44 | } | ||
44 | 45 | | |||
45 | ColumnLayout { | 46 | ColumnLayout { | ||
46 | id: delegateColumn | 47 | id: delegateColumn | ||
47 | Layout.fillWidth: true | 48 | Layout.fillWidth: true | ||
48 | 49 | | |||
49 | RowLayout { | 50 | RowLayout { | ||
50 | Label { | 51 | Label { | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |