diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-09-29 14:26:18 +0300 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-11-22 10:41:35 +0000 |
commit | 476128a09e78dee0c0afa9bfcfda8a88b6706c5b (patch) | |
tree | a9a1424ac0d51dc84fde7b10d36d60ddf4bfcadc /src/settingsui | |
parent | 1b5cb34a106560e5ee7d2d00c77fddf61ff4c327 (diff) |
Fix locale settings ui
Task-number: QTBUG-63091
Change-Id: I6847d4e6e29c712ae3051924fd8c3f1364675fe8
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'src/settingsui')
-rw-r--r-- | src/settingsui/locale/Language.qml | 105 | ||||
-rw-r--r-- | src/settingsui/locale/TableKey.qml | 7 | ||||
-rw-r--r-- | src/settingsui/locale/TableValue.qml | 7 |
3 files changed, 36 insertions, 83 deletions
diff --git a/src/settingsui/locale/Language.qml b/src/settingsui/locale/Language.qml index 79c72e7..55a6627 100644 --- a/src/settingsui/locale/Language.qml +++ b/src/settingsui/locale/Language.qml @@ -37,110 +37,73 @@ Item { id: root property var currentRegion: Qt.locale(LocaleManager.locale) - Row { - id: regionRow - anchors.top: parent.top - anchors.topMargin: parent.height * 0.075 - anchors.left: parent.left - height: parent.height * 0.075 + Column { + spacing: pluginMain.spacing Text { - width: root.width * 0.2 - height: root.height * 0.04 - anchors.verticalCenter: parent.verticalCenter - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - font.pixelSize: height color: "white" text: qsTr("Region") + font.pixelSize: pluginMain.subTitleFontSize font.family: appFont - font.styleName: "Bold" } - QtButton { - id: regionButton - height: parent.height - fillColor: "#41cd52" - text: root.currentRegion.nativeCountryName - onClicked: settingsLoader.source = "qrc:/locale/RegionSelect.qml" + + Row { + leftPadding: pluginMain.margin + spacing: pluginMain.spacing + Text { + color: "white" + text: root.currentRegion.nativeCountryName == "" ? "Default" : root.currentRegion.nativeCountryName + font.pixelSize: pluginMain.valueFontSize + font.family: appFont + verticalAlignment: Text.AlignVCenter + height: parent.height + } + QtButton { + id: regionButton + height: pluginMain.buttonHeight + fillColor: "#41cd52" + text: qsTr("CHANGE") + onClicked: settingsLoader.source = "qrc:/locale/RegionSelect.qml" + } } - } - Text { - id: formatText - width: root.width * 0.2 - anchors.top: regionRow.bottom - anchors.topMargin: parent.height * 0.1 - anchors.left: parent.left - font.pixelSize: parent.height * 0.04 - text: qsTr("Format") - horizontalAlignment: Text.AlignLeft - color: "white" - font.family: appFont - font.styleName: "Bold" - } + Text { + color: "white" + text: qsTr("Format") + font.pixelSize: pluginMain.subTitleFontSize + font.family: appFont + } + + Grid { + columns: 2 + leftPadding: pluginMain.margin + spacing: pluginMain.spacing - Column { - id: localeColumn - anchors.bottom: parent.bottom - anchors.top: formatText.bottom - anchors.topMargin: parent.height * 0.025 - anchors.left: formatText.right - width: parent.width * 0.5 - spacing: parent.height * 0.01 - Row { - id: regionFormat - anchors.left: parent.left - anchors.right: parent.right - height: parent.height * 0.1 TableKey { text: qsTr("Region") } TableValue { text: root.currentRegion.nativeCountryName } - } - Row { - id: shortDateFormat - anchors.left: parent.left - anchors.right: parent.right - height: parent.height * 0.1 + TableKey { text: qsTr("Short date:") } TableValue { text: root.currentRegion.dateFormat(1) } - } - Row { - id: shortTimeFormat - anchors.left: parent.left - - anchors.right: parent.right - height: parent.height * 0.1 TableKey { text: qsTr("Short time:") } TableValue { text: root.currentRegion.timeFormat(1) } - } - Row { - id: currencyFormat - anchors.left: parent.left - anchors.right: parent.right - height: parent.height * 0.1 TableKey { text: qsTr("Currency:") } TableValue { text: root.currentRegion.currencySymbol(1) } - } - Row { - id: firstDayFormat - anchors.left: parent.left - anchors.right: parent.right - height: parent.height * 0.1 TableKey { text: qsTr("First day of week:") } diff --git a/src/settingsui/locale/TableKey.qml b/src/settingsui/locale/TableKey.qml index 27e3fd4..523f0dd 100644 --- a/src/settingsui/locale/TableKey.qml +++ b/src/settingsui/locale/TableKey.qml @@ -29,12 +29,7 @@ import QtQuick 2.0 Text { - width: root.width * 0.325 - height: parent.height - anchors.verticalCenter: parent.verticalCenter - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - font.pixelSize: parent.height * 0.55 color: "white" + font.pixelSize: pluginMain.valueFontSize font.family: appFont } diff --git a/src/settingsui/locale/TableValue.qml b/src/settingsui/locale/TableValue.qml index f5ac00d..523f0dd 100644 --- a/src/settingsui/locale/TableValue.qml +++ b/src/settingsui/locale/TableValue.qml @@ -29,12 +29,7 @@ import QtQuick 2.0 Text { - width: root.width * 0.2 - height: parent.height - anchors.verticalCenter: parent.verticalCenter - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - font.pixelSize: parent.height * 0.55 color: "white" + font.pixelSize: pluginMain.valueFontSize font.family: appFont } |