From 476128a09e78dee0c0afa9bfcfda8a88b6706c5b Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Fri, 29 Sep 2017 14:26:18 +0300 Subject: Fix locale settings ui Task-number: QTBUG-63091 Change-Id: I6847d4e6e29c712ae3051924fd8c3f1364675fe8 Reviewed-by: Kari Oikarinen Reviewed-by: Teemu Holappa --- src/settingsui/locale/Language.qml | 105 ++++++++++++------------------------- 1 file changed, 34 insertions(+), 71 deletions(-) (limited to 'src/settingsui/locale/Language.qml') 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:") } -- cgit v1.2.3