Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/Devices.qml
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | Copyright 2014-2015 Harald Sitter <sitter@kde.org> | 2 | Copyright 2014-2015 Harald Sitter <sitter@kde.org> | ||
3 | Copyright 2019 Sefa Eyeoglu <contact@scrumplex.net> | ||||
3 | 4 | | |||
4 | This program is free software; you can redistribute it and/or | 5 | This program is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU General Public License as | 6 | modify it under the terms of the GNU General Public License as | ||
6 | published by the Free Software Foundation; either version 2 of | 7 | published by the Free Software Foundation; either version 2 of | ||
7 | the License or (at your option) version 3 or any later version | 8 | the License or (at your option) version 3 or any later version | ||
8 | accepted by the membership of KDE e.V. (or its successor approved | 9 | accepted by the membership of KDE e.V. (or its successor approved | ||
9 | by the membership of KDE e.V.), which shall act as a proxy | 10 | by the membership of KDE e.V.), which shall act as a proxy | ||
10 | defined in Section 14 of version 3 of the license. | 11 | defined in Section 14 of version 3 of the license. | ||
Show All 26 Lines | 36 | Component.onCompleted: { | |||
37 | width = Qt.binding(function() { | 38 | width = Qt.binding(function() { | ||
38 | return scrollView.width; | 39 | return scrollView.width; | ||
39 | }); | 40 | }); | ||
40 | } | 41 | } | ||
41 | 42 | | |||
42 | Header { | 43 | Header { | ||
43 | Layout.fillWidth: true | 44 | Layout.fillWidth: true | ||
44 | enabled: sinks.count > 0 | 45 | enabled: sinks.count > 0 | ||
45 | text: i18nd("kcm_pulseaudio", "Outputs") | 46 | text: i18nd("kcm_pulseaudio", "Playback Devices") | ||
46 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Output Devices Available") | 47 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Playback Devices Available") | ||
47 | } | 48 | } | ||
48 | 49 | | |||
49 | ListView { | 50 | ListView { | ||
50 | id: sinks | 51 | id: sinks | ||
51 | Layout.fillWidth: true | 52 | Layout.fillWidth: true | ||
52 | Layout.preferredHeight: contentHeight | 53 | Layout.preferredHeight: contentHeight | ||
53 | Layout.margins: units.gridUnit / 2 | 54 | Layout.margins: units.gridUnit / 2 | ||
54 | interactive: false | 55 | interactive: false | ||
55 | spacing: units.smallSpacing * 2 | 56 | spacing: units.smallSpacing * 2 | ||
56 | model: sinkModel | 57 | model: sinkModel | ||
57 | delegate: DeviceListItem {} | 58 | delegate: DeviceListItem { | ||
59 | isPlayback: true | ||||
60 | } | ||||
58 | } | 61 | } | ||
59 | 62 | | |||
60 | Header { | 63 | Header { | ||
61 | Layout.fillWidth: true | 64 | Layout.fillWidth: true | ||
62 | enabled: sources.count > 0 | 65 | enabled: sources.count > 0 | ||
63 | text: i18nd("kcm_pulseaudio", "Inputs") | 66 | text: i18nd("kcm_pulseaudio", "Recording Devices") | ||
64 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Input Devices Available") | 67 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Recording Devices Available") | ||
65 | } | 68 | } | ||
66 | 69 | | |||
67 | ListView { | 70 | ListView { | ||
68 | id: sources | 71 | id: sources | ||
69 | Layout.fillWidth: true | 72 | Layout.fillWidth: true | ||
70 | Layout.preferredHeight: contentHeight | 73 | Layout.preferredHeight: contentHeight | ||
71 | Layout.margins: units.gridUnit / 2 | 74 | Layout.margins: units.gridUnit / 2 | ||
72 | interactive: false | 75 | interactive: false | ||
73 | model: sourceModel | 76 | model: sourceModel | ||
74 | delegate: DeviceListItem {} | 77 | delegate: DeviceListItem { | ||
78 | isPlayback: false | ||||
79 | } | ||||
75 | } | 80 | } | ||
76 | } | 81 | } | ||
77 | } | 82 | } |