From 2b649a7da1980975117fd79769251cc433cebf1e Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Mon, 23 Oct 2017 13:30:05 +0300 Subject: Move theme color definitions to one place Task-number: QTBUG-60084 Change-Id: Ie80c9ebc26bd7925c7f0f67404878818675c0f06 Reviewed-by: Kari Oikarinen Reviewed-by: Teemu Holappa --- src/settingsui/bluetooth/CustomSwitch.qml | 2 +- src/settingsui/bluetooth/Discovery.qml | 8 ++++---- src/settingsui/common/CustomTableView.qml | 4 ++-- src/settingsui/display/Display.qml | 10 +++++----- src/settingsui/locale/RegionSelect.qml | 6 +++--- src/settingsui/network/NetworkListView.qml | 10 +++++----- src/settingsui/network/PassphraseEnter.qml | 8 ++++---- src/settingsui/settingsuiplugin/SettingsDelegate.qml | 4 ++-- src/settingsui/settingsuiplugin/ShutdownPopup.qml | 6 +++--- src/settingsui/timedate/CustomComboBox.qml | 8 ++++---- src/settingsui/timedate/ManualTime.qml | 12 ++++++------ src/settingsui/timedate/TimeDate.qml | 4 ++-- 12 files changed, 41 insertions(+), 41 deletions(-) (limited to 'src/settingsui') diff --git a/src/settingsui/bluetooth/CustomSwitch.qml b/src/settingsui/bluetooth/CustomSwitch.qml index adb7031..fa9f9aa 100644 --- a/src/settingsui/bluetooth/CustomSwitch.qml +++ b/src/settingsui/bluetooth/CustomSwitch.qml @@ -90,7 +90,7 @@ Switch { anchors.verticalCenter: parent.verticalCenter width: parent.width * 0.475 height: parent.height * 0.9 - fillColor: control.checked ? "#41cd52" : "#9d9faa" + fillColor: control.checked ? viewSettings.buttonGreenColor : viewSettings.buttonGrayColor text: control.checked ? "ON" : "OFF" borderColor: "transparent" Behavior on x { diff --git a/src/settingsui/bluetooth/Discovery.qml b/src/settingsui/bluetooth/Discovery.qml index 2d6a88c..515d37a 100644 --- a/src/settingsui/bluetooth/Discovery.qml +++ b/src/settingsui/bluetooth/Discovery.qml @@ -94,7 +94,7 @@ Item { verticalAlignment: Text.AlignVCenter font.pixelSize: mainList.height * 0.06 text: name - color: connected ? "#41cd52" : "white" + color: connected ? viewSettings.buttonGreenColor : "white" font.family: appFont font.styleName: connected ? "SemiBold" : "Regular" } @@ -104,7 +104,7 @@ Item { opacity: btDelegate.expanded || connected ? 1 : 0.0 visible: opacity > 0 text: address - color: connected ? "#41cd52" : "white" + color: connected ? viewSettings.buttonGreenColor : "white" font.family: appFont Behavior on opacity { NumberAnimation { duration: 200} } } @@ -116,7 +116,7 @@ Item { anchors.verticalCenter: parent.verticalCenter opacity: (expanded || connected) && !BtDevice.scanning ? 1.0 : 0.0 visible: opacity > 0 - fillColor: connected ? "#9d9faa" : "#41cd52" + fillColor: connected ? viewSettings.buttonGrayColor : viewSettings.buttonGreenColor borderColor: "transparent" text: connected ? qsTr("Disconnect") : qsTr("Connect") onClicked : connected ? BtDevice.requestDisconnect(address) : BtDevice.requestPairing(address); @@ -127,7 +127,7 @@ Item { Rectangle { id: delegateBottom width: btDelegate.width - color: "#9d9faa" + color: viewSettings.borderColor height: 2 anchors.bottom: btDelegate.bottom anchors.horizontalCenter: btDelegate.horizontalCenter diff --git a/src/settingsui/common/CustomTableView.qml b/src/settingsui/common/CustomTableView.qml index 9efd584..2eb42e4 100644 --- a/src/settingsui/common/CustomTableView.qml +++ b/src/settingsui/common/CustomTableView.qml @@ -64,7 +64,7 @@ ColumnLayout { contentItem: Rectangle { implicitWidth: listView.width * 0.0175 implicitHeight: listView.height * 0.5 - color: "#41cd52" + color: viewSettings.scrollBarColor } } @@ -91,7 +91,7 @@ ColumnLayout { antialiasing: false smooth: false renderType: listView.moving ? Text.NativeRendering : Text.QtRendering - color: listView.currentIndex == delegateRectangle.index ? "#41cd52" : "white" + color: listView.currentIndex == delegateRectangle.index ? viewSettings.buttonGreenColor : "white" font.family: appFont } } diff --git a/src/settingsui/display/Display.qml b/src/settingsui/display/Display.qml index f889421..ecb1e33 100644 --- a/src/settingsui/display/Display.qml +++ b/src/settingsui/display/Display.qml @@ -68,7 +68,7 @@ Item { width: brightnessSlider.availableWidth height: implicitHeight radius: 2 - color: "#9d9faa" + color: viewSettings.buttonGrayColor Rectangle { width: brightnessSlider.visualPosition * parent.width height: parent.height @@ -83,7 +83,7 @@ Item { width: height radius: width * 0.5 antialiasing: true - color: "#41cd52" + color: viewSettings.buttonGreenColor } Component.onCompleted: brightnessSlider.value = DisplaySettings.displayBrightness @@ -127,7 +127,7 @@ Item { horizontalAlignment: Text.AlignHCenter inputMethodHints: Qt.ImhDigitsOnly background: Rectangle { - border.color: widthField.focus ? "#41cd52" : "transparent" + border.color: widthField.focus ? viewSettings.buttonGreenColor : "transparent" border.width: parent.width * 0.05 } } @@ -150,7 +150,7 @@ Item { horizontalAlignment: Text.AlignHCenter inputMethodHints: Qt.ImhDigitsOnly background: Rectangle { - border.color: heightField.focus ? "#41cd52" : "transparent" + border.color: heightField.focus ? viewSettings.buttonGreenColor : "transparent" border.width: parent.width * 0.05 } } @@ -172,7 +172,7 @@ Item { id: resetButton height: pluginMain.buttonHeight borderColor: "transparent" - fillColor: "#9d9faa" + fillColor: viewSettings.buttonGrayColor text: qsTr("RESET TO DEFAULT") onClicked: { DisplaySettings.physicalScreenHeightMm = 90 diff --git a/src/settingsui/locale/RegionSelect.qml b/src/settingsui/locale/RegionSelect.qml index 9ff4aad..9741818 100644 --- a/src/settingsui/locale/RegionSelect.qml +++ b/src/settingsui/locale/RegionSelect.qml @@ -55,7 +55,7 @@ Item { ColorOverlay { source: languageBackIcon anchors.fill: languageBackIcon - color: "#41cd52" + color: viewSettings.buttonGreenColor visible: true } MouseArea { @@ -71,7 +71,7 @@ Item { fontSizeMode: Text.Fit minimumPixelSize: 1 font.pixelSize: height - color: "#41cd52" + color: viewSettings.buttonGreenColor text: "Back" font.family: appFont MouseArea { @@ -128,7 +128,7 @@ Item { Layout.alignment: Qt.AlignVCenter background: Rectangle { color: "transparent" - border.color: "#9d9faa" + border.color: viewSettings.borderColor border.width: 2 } } diff --git a/src/settingsui/network/NetworkListView.qml b/src/settingsui/network/NetworkListView.qml index 4bc54da..e658760 100644 --- a/src/settingsui/network/NetworkListView.qml +++ b/src/settingsui/network/NetworkListView.qml @@ -54,7 +54,7 @@ ListView { verticalAlignment: Text.AlignVCenter font.pixelSize: pluginMain.subTitleFontSize font.family: appFont - color: connected ? "#41cd52" : "white" + color: connected ? viewSettings.buttonGreenColor : "white" text: name } Row { @@ -70,7 +70,7 @@ ListView { height: parent.height anchors.verticalCenter: parent.verticalCenter text: qsTr("IP Address:") - color: connected ? "#41cd52" : "white" + color: connected ? viewSettings.buttonGreenColor : "white" font.pixelSize: pluginMain.valueFontSize font.family: appFont verticalAlignment: Text.AlignVCenter @@ -83,7 +83,7 @@ ListView { anchors.verticalCenter: parent.verticalCenter verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft - color: connected ? "#41cd52" : "white" + color: connected ? viewSettings.buttonGreenColor : "white" text: connected ? NetworkSettingsManager.services.itemFromRow(index).ipv4.address : qsTr("Not connected") font.pixelSize: pluginMain.valueFontSize font.family: appFont @@ -95,7 +95,7 @@ ListView { id: connectButton anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - fillColor: connected ? "#9d9faa" : "#41cd52" + fillColor: connected ? viewSettings.buttonGrayColor : viewSettings.buttonGreenColor borderColor: "transparent" text: connected ? qsTr("DISCONNECT") : qsTr("CONNECT") height: pluginMain.buttonHeight @@ -114,7 +114,7 @@ ListView { Rectangle { id: delegateBottom width: networkDelegate.width - color: "#9d9faa" + color: viewSettings.borderColor height: 2 anchors.bottom: networkDelegate.bottom anchors.horizontalCenter: networkDelegate.horizontalCenter diff --git a/src/settingsui/network/PassphraseEnter.qml b/src/settingsui/network/PassphraseEnter.qml index d9d80d3..de32d2a 100644 --- a/src/settingsui/network/PassphraseEnter.qml +++ b/src/settingsui/network/PassphraseEnter.qml @@ -51,7 +51,7 @@ Item { ColorOverlay { source: passBackIcon anchors.fill: passBackIcon - color: "#41cd52" + color: viewSettings.buttonGreenColor visible: true } MouseArea { @@ -68,7 +68,7 @@ Item { fontSizeMode: Text.Fit minimumPixelSize: 1 font.pixelSize: height - color: "#41cd52" + color: viewSettings.buttonGreenColor text: "Back" MouseArea { anchors.fill: parent @@ -107,7 +107,7 @@ Item { echoMode: TextInput.Password background: Rectangle { color: "transparent" - border.color: passField.focus ? "#41cd52" : "#9d9faa" + border.color: passField.focus ? viewSettings.buttonGreenColor : viewSettings.buttonGrayColor border.width: passField.focus ? width * 0.01 : 2 } } @@ -130,7 +130,7 @@ Item { height: parent.height text: qsTr("CANCEL") borderColor: "transparent" - fillColor: "#9d9faa" + fillColor: viewSettings.buttonGrayColor onClicked: { passField.focus = false passField.clear() diff --git a/src/settingsui/settingsuiplugin/SettingsDelegate.qml b/src/settingsui/settingsuiplugin/SettingsDelegate.qml index abb864e..91f4ca4 100644 --- a/src/settingsui/settingsuiplugin/SettingsDelegate.qml +++ b/src/settingsui/settingsuiplugin/SettingsDelegate.qml @@ -52,7 +52,7 @@ Item { source: img anchors.fill: img visible: parent.isSelected ? true : false - color: "#41cd52" + color: viewSettings.buttonGreenColor } Text { @@ -65,7 +65,7 @@ Item { fontSizeMode: Text.Fit minimumPixelSize: 1 font.pixelSize: Math.min(parent.width * 0.25, parent.height) - color: parent.isSelected ? "#41cd52" : "white" + color: parent.isSelected ? viewSettings.buttonGreenColor : "white" wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter font.family: appFont diff --git a/src/settingsui/settingsuiplugin/ShutdownPopup.qml b/src/settingsui/settingsuiplugin/ShutdownPopup.qml index b1ce3e4..1ce4480 100644 --- a/src/settingsui/settingsuiplugin/ShutdownPopup.qml +++ b/src/settingsui/settingsuiplugin/ShutdownPopup.qml @@ -32,7 +32,7 @@ Rectangle { id: shutdownPopup width: parent.width height: parent.height - color: "#09102b" + color: viewSettings.backgroundColor opacity: 0.9 signal accepted() @@ -60,8 +60,8 @@ Rectangle { Rectangle { id: frame - color: "#09102b" - border.color: "#9d9faa" + color: viewSettings.backgroundColor + border.color: viewSettings.borderColor border.width: 3 anchors.centerIn: parent width: parent.width * 0.35 diff --git a/src/settingsui/timedate/CustomComboBox.qml b/src/settingsui/timedate/CustomComboBox.qml index 3c8e752..66c3559 100644 --- a/src/settingsui/timedate/CustomComboBox.qml +++ b/src/settingsui/timedate/CustomComboBox.qml @@ -47,7 +47,7 @@ ComboBox { id: indicatorOverlay source: indicatorImage anchors.fill: indicatorImage - color: "#41cd52" + color: viewSettings.buttonGreenColor visible: false rotation: -90 } @@ -64,7 +64,7 @@ ComboBox { } background: Rectangle { color: "transparent" - border.color: "#9d9faa" + border.color: viewSettings.borderColor border.width: comboBox.visualFocus ? 2 : 1 } popup: Popup { @@ -90,8 +90,8 @@ ComboBox { indicatorOverlay.visible = false } background: Rectangle { - border.color: "#9d9faa" - color: "#09102b" + border.color: viewSettings.borderColor + color: viewSettings.backgroundColor opacity: 0.95 } } diff --git a/src/settingsui/timedate/ManualTime.qml b/src/settingsui/timedate/ManualTime.qml index df4a8b8..bdb82cd 100644 --- a/src/settingsui/timedate/ManualTime.qml +++ b/src/settingsui/timedate/ManualTime.qml @@ -73,7 +73,7 @@ Item { anchors.left: dayDelegate.left anchors.leftMargin: pluginMain.margin text: modelData + 1 - color: dayBox.currentIndex == index ? "#41cd52" : "white" + color: dayBox.currentIndex == index ? viewSettings.buttonGreenColor : "white" elide: Text.ElideRight verticalAlignment: Text.AlignVCenter font.pixelSize: pluginMain.valueFontSize @@ -105,7 +105,7 @@ Item { contentItem: Text { anchors.left: monthDelegate.left anchors.leftMargin: pluginMain.margin - color: monthBox.currentIndex == index ? "#41cd52" : "white" + color: monthBox.currentIndex == index ? viewSettings.buttonGreenColor : "white" elide: Text.ElideRight text: modelData verticalAlignment: Text.AlignVCenter @@ -132,7 +132,7 @@ Item { anchors.left: yearDelegate.left anchors.leftMargin: pluginMain.margin text: index + firstYear - color: yearBox.currentIndex == index ? "#41cd52" : "white" + color: yearBox.currentIndex == index ? viewSettings.buttonGreenColor : "white" elide: Text.ElideRight verticalAlignment: Text.AlignVCenter font.pixelSize: pluginMain.valueFontSize @@ -172,7 +172,7 @@ Item { anchors.left: hourDelegate.left anchors.leftMargin: pluginMain.margin text: zeroPadTime(parseInt(modelData)) - color: hourBox.currentIndex == index ? "#41cd52" : "white" + color: hourBox.currentIndex == index ? viewSettings.buttonGreenColor : "white" elide: Text.ElideRight verticalAlignment: Text.AlignVCenter font.pixelSize: pluginMain.valueFontSize @@ -198,7 +198,7 @@ Item { anchors.left: minuteDelegate.left anchors.leftMargin: pluginMain.margin text: zeroPadTime(parseInt(modelData)) - color: minuteBox.currentIndex == index ? "#41cd52" : "white" + color: minuteBox.currentIndex == index ? viewSettings.buttonGreenColor : "white" elide: Text.ElideRight verticalAlignment: Text.AlignVCenter font.pixelSize: pluginMain.valueFontSize @@ -237,7 +237,7 @@ Item { QtButton { id: dateCancelButton height: pluginMain.buttonHeight - fillColor: "#9d9faa" + fillColor: viewSettings.buttonGrayColor borderColor: "transparent" text: qsTr("CANCEL") onClicked: { diff --git a/src/settingsui/timedate/TimeDate.qml b/src/settingsui/timedate/TimeDate.qml index 95e93bf..2104c75 100644 --- a/src/settingsui/timedate/TimeDate.qml +++ b/src/settingsui/timedate/TimeDate.qml @@ -89,7 +89,7 @@ Item { QtButton { id: manualButton height: pluginMain.buttonHeight - fillColor: "#9d9faa" + fillColor: viewSettings.buttonGrayColor borderColor: "transparent" text: qsTr("MANUALLY") onClicked: { @@ -122,7 +122,7 @@ Item { anchors.left: timeZoneDelegate.left anchors.leftMargin: pluginMain.margin text: modelData["id"] - color: timeZoneBox.currentIndex == index ? "#41cd52" : "white" + color: timeZoneBox.currentIndex == index ? viewSettings.buttonGreenColor : "white" elide: Text.ElideRight verticalAlignment: Text.AlignVCenter font.pixelSize: pluginMain.valueFontSize -- cgit v1.2.3