Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/Devices.qml
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | import QtQuick 2.0 | 21 | import QtQuick 2.0 | ||
22 | import QtQuick.Layouts 1.1 | 22 | import QtQuick.Layouts 1.1 | ||
23 | import QtQuick.Controls 1.3 | 23 | import QtQuick.Controls 2.3 | ||
24 | 24 | | |||
25 | ScrollView { | 25 | ScrollView { | ||
26 | id: scrollView | 26 | id: scrollView | ||
27 | 27 | | |||
28 | contentWidth: contentLayout.width | ||||
29 | contentHeight: contentLayout.height | ||||
30 | clip: true | ||||
31 | | ||||
28 | ColumnLayout { | 32 | ColumnLayout { | ||
33 | id: contentLayout | ||||
34 | | ||||
29 | Component.onCompleted: { | 35 | Component.onCompleted: { | ||
30 | // Normal binding causes binding loops | 36 | // Normal binding causes binding loops | ||
31 | width = Qt.binding(function() { | 37 | width = Qt.binding(function() { | ||
32 | return scrollView.viewport.width; | 38 | return scrollView.width; | ||
33 | }); | 39 | }); | ||
34 | } | 40 | } | ||
35 | 41 | | |||
36 | Header { | 42 | Header { | ||
37 | Layout.fillWidth: true | 43 | Layout.fillWidth: true | ||
38 | enabled: sinks.count > 0 | 44 | enabled: sinks.count > 0 | ||
39 | text: i18nd("kcm_pulseaudio", "Outputs") | 45 | text: i18nd("kcm_pulseaudio", "Outputs") | ||
40 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Output Devices Available") | 46 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Output Devices Available") | ||
Show All 31 Lines |