diff options
Diffstat (limited to 'src/settingsui/timedate/TimezonesView.qml')
-rw-r--r-- | src/settingsui/timedate/TimezonesView.qml | 52 |
1 files changed, 20 insertions, 32 deletions
diff --git a/src/settingsui/timedate/TimezonesView.qml b/src/settingsui/timedate/TimezonesView.qml index 4e09350..16ac10e 100644 --- a/src/settingsui/timedate/TimezonesView.qml +++ b/src/settingsui/timedate/TimezonesView.qml @@ -33,57 +33,45 @@ ** $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.timedate 1.0 - +import "../common" Item { id: root + property string title: qsTr("Timezone settings") Component.onCompleted: timezone.text = TimezonesFilter.filter - Column { + ColumnLayout { id: content anchors.fill: parent - anchors.margins: Math.round(20 * Flat.FlatStyle.scaleFactor) - spacing: Math.round(10 * Flat.FlatStyle.scaleFactor) - Row { - spacing: Math.round(10 * Flat.FlatStyle.scaleFactor) + anchors.margins: 20 + spacing: 10 - TextLabel { + RowLayout { + spacing: 10 + + Label { text: qsTr("Search area: ") + Layout.alignment: Qt.AlignVCenter } - TextField { id: timezone text: "" onTextChanged: TimezonesFilter.filter = timezone.text + Layout.alignment: Qt.AlignVCenter } } - - TableView { - width: parent.width - height: Math.round(parent.height - 40 * Flat.FlatStyle.scaleFactor) - Layout.fillWidth: true + CustomTableView { + headerTexts: [qsTr("Timezone"), qsTr("Country")] + roleNames: ["id", "country"] model: TimezonesFilter - headerVisible: true - - TableViewColumn { - role: "name" - title: qsTr("Timezone") - width: Math.round(parent.width * 0.66) - } - TableViewColumn { - role: "country" - title: qsTr("Country") - width: Math.round(parent.width * 0.33) - } - onClicked: { - var val = model.itemFromRow(row); + var val = model.itemFromRow(index); if (val !== "") { TimeManager.timeZone = val; stackView.pop(); |