From c6b5855b446c73f8a60cc3d4427fc445e0ba400d Mon Sep 17 00:00:00 2001 From: Kimmo Ollila Date: Tue, 23 Feb 2016 09:13:21 +0200 Subject: Migrate settings UI to use Qt Quick Controls 2 Task-number: QTEE-1057 Change-Id: I389d784241d4b68384765dfde4b572e7652eb76c Reviewed-by: Teemu Holappa --- src/settingsui/bluetooth/Bluetooth.qml | 55 +++++++++++++++------------------- 1 file changed, 24 insertions(+), 31 deletions(-) (limited to 'src/settingsui/bluetooth/Bluetooth.qml') diff --git a/src/settingsui/bluetooth/Bluetooth.qml b/src/settingsui/bluetooth/Bluetooth.qml index d16bdb3..2bffe5b 100644 --- a/src/settingsui/bluetooth/Bluetooth.qml +++ b/src/settingsui/bluetooth/Bluetooth.qml @@ -33,57 +33,50 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import QtQuick 2.5 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles.Flat 1.0 as Flat -import "../common" +import QtQuick 2.6 +import QtQuick.Layouts 1.3 +import Qt.labs.controls 1.0 +import Qt.labs.controls.material 1.0 +import Qt.labs.controls.universal 1.0 import com.theqtcompany.settings.bluetooth 1.0 Item { id: root property string title: qsTr("Bluetooth Settings") - Column { - id: content + ColumnLayout { + anchors.margins: 20 anchors.fill: parent - anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor) + id: content + spacing: 20 GroupBox { id: groupBox width: parent.width title: qsTr("Bluetooth status") Layout.fillWidth: true + Layout.alignment: Qt.AlignTop - ColumnLayout { - spacing: Math.round(10 * Flat.FlatStyle.scaleFactor) - width: parent.width - Layout.fillWidth: true - - Row { - spacing: Math.round(10 * Flat.FlatStyle.scaleFactor) - TextLabel { - id: off - text: qsTr("Off") - } - - Switch { - checked: BtDevice.powered - onCheckedChanged: BtDevice.powered = checked - } - - TextLabel { - text: qsTr("On") - } + RowLayout { + spacing: 10 + Label { + id: off + text: qsTr("Off") + } + Switch { + checked: BtDevice.powered + onCheckedChanged: BtDevice.powered = checked + } + Label { + text: qsTr("On") } } } - Discovery { id: discovery visible: BtDevice.powered - width: parent.width - height: Math.round(content.height - 100 * Flat.FlatStyle.scaleFactor) + Layout.fillWidth: true + Layout.fillHeight: true } } } -- cgit v1.2.3