Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/Devices.qml
Show All 17 Lines | 1 | /* | |||
---|---|---|---|---|---|
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | import QtQuick 2.0 | 22 | import QtQuick 2.0 | ||
23 | import QtQuick.Layouts 1.1 | 23 | import QtQuick.Layouts 1.1 | ||
24 | import QtQuick.Controls 2.3 | 24 | import QtQuick.Controls 2.3 | ||
25 | 25 | | |||
26 | import org.kde.kirigami 2.5 as Kirigami | ||||
27 | | ||||
26 | ScrollView { | 28 | ScrollView { | ||
27 | id: scrollView | 29 | id: scrollView | ||
28 | 30 | | |||
29 | contentHeight: contentItem.height | 31 | contentHeight: contentItem.height | ||
30 | clip: true | 32 | clip: true | ||
31 | 33 | | |||
32 | Item { | 34 | Item { | ||
33 | id: contentItem | 35 | id: contentItem | ||
Show All 10 Lines | 43 | Header { | |||
44 | text: i18nd("kcm_pulseaudio", "Playback Devices") | 46 | text: i18nd("kcm_pulseaudio", "Playback Devices") | ||
45 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Playback Devices Available") | 47 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Playback Devices Available") | ||
46 | } | 48 | } | ||
47 | 49 | | |||
48 | ListView { | 50 | ListView { | ||
49 | id: sinks | 51 | id: sinks | ||
50 | Layout.fillWidth: true | 52 | Layout.fillWidth: true | ||
51 | Layout.preferredHeight: contentHeight | 53 | Layout.preferredHeight: contentHeight | ||
52 | Layout.margins: units.gridUnit / 2 | 54 | Layout.margins: Kirigami.Units.gridUnit / 2 | ||
53 | interactive: false | 55 | interactive: false | ||
54 | spacing: units.smallSpacing * 2 | 56 | spacing: Kirigami.Units.gridUnit | ||
55 | model: sinkModel | 57 | model: sinkModel | ||
56 | delegate: DeviceListItem { | 58 | delegate: DeviceListItem { | ||
57 | isPlayback: true | 59 | isPlayback: true | ||
58 | } | 60 | } | ||
59 | } | 61 | } | ||
60 | 62 | | |||
61 | Header { | 63 | Header { | ||
62 | Layout.fillWidth: true | 64 | Layout.fillWidth: true | ||
63 | enabled: sources.count > 0 | 65 | enabled: sources.count > 0 | ||
64 | text: i18nd("kcm_pulseaudio", "Recording Devices") | 66 | text: i18nd("kcm_pulseaudio", "Recording Devices") | ||
65 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Recording Devices Available") | 67 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Recording Devices Available") | ||
66 | } | 68 | } | ||
67 | 69 | | |||
68 | ListView { | 70 | ListView { | ||
69 | id: sources | 71 | id: sources | ||
70 | Layout.fillWidth: true | 72 | Layout.fillWidth: true | ||
71 | Layout.preferredHeight: contentHeight | 73 | Layout.preferredHeight: contentHeight | ||
72 | Layout.margins: units.gridUnit / 2 | 74 | Layout.margins: Kirigami.Units.gridUnit / 2 | ||
73 | interactive: false | 75 | interactive: false | ||
76 | spacing: Kirigami.Units.gridUnit | ||||
74 | model: sourceModel | 77 | model: sourceModel | ||
75 | delegate: DeviceListItem { | 78 | delegate: DeviceListItem { | ||
76 | isPlayback: false | 79 | isPlayback: false | ||
77 | } | 80 | } | ||
78 | } | 81 | } | ||
79 | } | 82 | } | ||
80 | } | 83 | } | ||
81 | } | 84 | } |