From 0bcfd36256cde161c7c9871e4a2b8d185003e780 Mon Sep 17 00:00:00 2001 From: Lubos Date: Wed, 29 Nov 2023 16:52:01 +0100 Subject: [PATCH] Revert "Workaround to use new design with StyleV2.qml" This reverts commit 3af22aefc652aa09cb591d868e8f16709b28410f. --- app/qmlV2/StyleV2.qml | 2 +- app/qmlV2/component/MMButton.qml | 8 ++--- app/qmlV2/component/MMButtonInput.qml | 34 +++++++++---------- app/qmlV2/component/MMCheckBox.qml | 12 +++---- app/qmlV2/component/MMComboBox.qml | 32 ++++++++--------- .../MMComponent_reachedDataLimit.qml | 30 ++++++++-------- app/qmlV2/component/MMDrawer.qml | 20 +++++------ app/qmlV2/component/MMIcon.qml | 4 +-- app/qmlV2/component/MMInput.qml | 32 ++++++++--------- app/qmlV2/component/MMLink.qml | 10 +++--- app/qmlV2/component/MMLinkButton.qml | 10 +++--- app/qmlV2/component/MMMapButton.qml | 8 ++--- app/qmlV2/component/MMMapLabel.qml | 10 +++--- app/qmlV2/component/MMMenuDrawer.qml | 14 ++++---- app/qmlV2/component/MMNotification.qml | 30 ++++++++-------- app/qmlV2/component/MMNotificationView.qml | 6 ++-- app/qmlV2/component/MMPasswordInput.qml | 32 ++++++++--------- app/qmlV2/component/MMProgressBar.qml | 2 -- app/qmlV2/component/MMRadioButton.qml | 12 +++---- app/qmlV2/component/MMRoundButton.qml | 8 ++--- app/qmlV2/component/MMRoundLinkButton.qml | 10 +++--- app/qmlV2/component/MMShadow.qml | 5 +-- app/qmlV2/component/MMSwitch.qml | 10 +++--- app/qmlV2/component/MMTextArea.qml | 22 ++++++------ app/qmlV2/component/MMToolbar.qml | 10 +++--- app/qmlV2/component/MMToolbarButton.qml | 16 ++++----- app/qmlV2/component/MMToolbarLongButton.qml | 10 +++--- app/qmlV2/component/MMToolbarMenuButton.qml | 12 +++---- gallery/qml/pages/DrawerPage.qml | 8 ++--- gallery/qml/pages/InitialGalleryPage.qml | 2 -- gallery/qml/pages/InputsPage.qml | 7 ++-- gallery/qml/pages/MapPage.qml | 8 ++--- gallery/qml/pages/ToolbarPage.qml | 30 ++++++++-------- 33 files changed, 200 insertions(+), 266 deletions(-) diff --git a/app/qmlV2/StyleV2.qml b/app/qmlV2/StyleV2.qml index 9f008147c..7223ba69f 100644 --- a/app/qmlV2/StyleV2.qml +++ b/app/qmlV2/StyleV2.qml @@ -7,7 +7,7 @@ * * ***************************************************************************/ -//pragma Singleton +pragma Singleton import QtQuick QtObject { diff --git a/app/qmlV2/component/MMButton.qml b/app/qmlV2/component/MMButton.qml index 674f6521c..ec3e6a31d 100644 --- a/app/qmlV2/component/MMButton.qml +++ b/app/qmlV2/component/MMButton.qml @@ -18,24 +18,22 @@ Button { property bool transparent: false - StyleV2 { id: styleV2 } - contentItem: Text { anchors.centerIn: control - font: styleV2.t3 + font: StyleV2.t3 text: control.text leftPadding: 32 * __dp rightPadding: 32 * __dp topPadding: 10 * __dp bottomPadding: 10 * __dp - color: control.enabled ? control.down || control.hovered ? styleV2.grassColor : styleV2.forestColor : styleV2.forestColor + color: control.enabled ? control.down || control.hovered ? StyleV2.grassColor : StyleV2.forestColor : StyleV2.forestColor horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } background: Rectangle { - color: transparent ? "transparent" : control.enabled ? control.down || control.hovered ? styleV2.forestColor : styleV2.grassColor : styleV2.mediumGreenColor + color: transparent ? "transparent" : control.enabled ? control.down || control.hovered ? StyleV2.forestColor : StyleV2.grassColor : StyleV2.mediumGreenColor radius: height / 2 } } diff --git a/app/qmlV2/component/MMButtonInput.qml b/app/qmlV2/component/MMButtonInput.qml index f8918b4b4..a0a22e46b 100644 --- a/app/qmlV2/component/MMButtonInput.qml +++ b/app/qmlV2/component/MMButtonInput.qml @@ -28,13 +28,11 @@ Column { spacing: 6 * __dp width: 280 * __dp - StyleV2 { id: styleV2 } - Text { id: titleItem width: parent.width - font: styleV2.p6 + font: StyleV2.p6 wrapMode: Text.WordWrap visible: text.length > 0 } @@ -44,8 +42,8 @@ Column { height: 40 * __dp width: parent.width - color: (errorMsg.length > 0 || warningMsg.length > 0) ? styleV2.errorBgInputColor : styleV2.whiteColor - border.color: errorMsg.length > 0 ? styleV2.negativeColor : warningMsg.length > 0 ? styleV2.warningColor : styleV2.forestColor + color: (errorMsg.length > 0 || warningMsg.length > 0) ? StyleV2.errorBgInputColor : StyleV2.whiteColor + border.color: errorMsg.length > 0 ? StyleV2.negativeColor : warningMsg.length > 0 ? StyleV2.warningColor : StyleV2.forestColor border.width: enabled ? (textField.activeFocus ? 2*__dp : textField.hovered ? 1*__dp : 0) : 0 radius: parent.height @@ -59,9 +57,9 @@ Column { id: leftIcon source: control.iconSource - color: errorMsg.length > 0 ? styleV2.negativeColor : - warningMsg.length > 0 ? styleV2.warningColor : - control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + color: errorMsg.length > 0 ? StyleV2.negativeColor : + warningMsg.length > 0 ? StyleV2.warningColor : + control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor height: rect.height } @@ -73,13 +71,13 @@ Column { - (leftIcon.visible ? leftIcon.width : 0) - (button.visible ? button.width : 0) height: rect.height - 4 * __dp - color: control.enabled ? styleV2.nightColor : styleV2.mediumGreenColor - placeholderTextColor: styleV2.nightAlphaColor - font: styleV2.p5 + color: control.enabled ? StyleV2.nightColor : StyleV2.mediumGreenColor + placeholderTextColor: StyleV2.nightAlphaColor + font: StyleV2.p5 hoverEnabled: true anchors.verticalCenter: parent.verticalCenter background: Rectangle { - color: styleV2.transparentColor + color: StyleV2.transparentColor } } @@ -90,20 +88,20 @@ Column { contentItem: Text { anchors.centerIn: button - font: styleV2.t5 + font: StyleV2.t5 text: control.buttonText leftPadding: 2 * __dp rightPadding: 2 * __dp topPadding: 2 * __dp bottomPadding: 2 * __dp - color: styleV2.deepOceanColor + color: StyleV2.deepOceanColor horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } background: Rectangle { - color: button.enabled ? styleV2.grassColor : styleV2.mediumGreenColor + color: button.enabled ? StyleV2.grassColor : StyleV2.mediumGreenColor radius: height / 2 } @@ -126,13 +124,13 @@ Column { MMIcon { id: msgIcon - source: visible ? styleV2.errorIcon : "" - color: errorMsg.length > 0 ? styleV2.negativeColor : styleV2.warningColor + source: visible ? StyleV2.errorIcon : "" + color: errorMsg.length > 0 ? StyleV2.negativeColor : StyleV2.warningColor visible: errorMsg.length > 0 || warningMsg.length > 0 } Text { text: errorMsg.length > 0 ? errorMsg : warningMsg - font: styleV2.t4 + font: StyleV2.t4 wrapMode: Text.WordWrap width: messageItem.width - msgRow.spacing - msgIcon.width visible: errorMsg.length > 0 || warningMsg.length > 0 diff --git a/app/qmlV2/component/MMCheckBox.qml b/app/qmlV2/component/MMCheckBox.qml index b3d238907..a33797267 100644 --- a/app/qmlV2/component/MMCheckBox.qml +++ b/app/qmlV2/component/MMCheckBox.qml @@ -17,31 +17,29 @@ CheckBox { checked: true - StyleV2 { id: styleV2 } - indicator: Rectangle { implicitWidth: 24 implicitHeight: 24 x: control.leftPadding y: parent.height / 2 - height / 2 radius: 5 - color: enabled ? ( control.checked ? styleV2.grassColor: styleV2.whiteColor ) : styleV2.whiteColor - border.color: enabled ? ( control.checked ? styleV2.grassColor: styleV2.forestColor ) : styleV2.mediumGreenColor + color: enabled ? ( control.checked ? StyleV2.grassColor: StyleV2.whiteColor ) : StyleV2.whiteColor + border.color: enabled ? ( control.checked ? StyleV2.grassColor: StyleV2.forestColor ) : StyleV2.mediumGreenColor border.width: control.hovered ? 2.5 : 2 MMIcon { id: icon anchors.centerIn: parent - source: styleV2.checkmarkIcon - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + source: StyleV2.checkmarkIcon + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor visible: control.checked } } contentItem: Text { text: control.text - font: styleV2.p5 + font: StyleV2.p5 color: icon.color verticalAlignment: Text.AlignVCenter leftPadding: control.indicator.width + control.spacing diff --git a/app/qmlV2/component/MMComboBox.qml b/app/qmlV2/component/MMComboBox.qml index 59b76f1db..f01e15f98 100644 --- a/app/qmlV2/component/MMComboBox.qml +++ b/app/qmlV2/component/MMComboBox.qml @@ -24,8 +24,6 @@ Item { width: 280 * __dp height: combobox.height + messageItem.height - StyleV2 { id: styleV2 } - ComboBox { id: combobox @@ -33,8 +31,8 @@ Item { height: 40 * __dp indicator: MMIcon { - source: popup.visible ? styleV2.arrowUpIcon : styleV2.arrowDownIcon - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + source: popup.visible ? StyleV2.arrowUpIcon : StyleV2.arrowDownIcon + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor x: combobox.width - width - combobox.rightPadding anchors.verticalCenter: parent.verticalCenter } @@ -44,17 +42,17 @@ Item { rightPadding: combobox.indicator.width + combobox.spacing text: combobox.displayText - font: styleV2.p4 - color: control.enabled ? styleV2.nightColor : styleV2.mediumGreenColor + font: StyleV2.p4 + color: control.enabled ? StyleV2.nightColor : StyleV2.mediumGreenColor verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } background: Rectangle { - color: (errorMsg.length > 0 || warningMsg.length > 0) ? styleV2.errorBgInputColor : styleV2.whiteColor - border.color: (combobox.activeFocus || combobox.hovered) ? (errorMsg.length > 0 ? styleV2.negativeColor : - warningMsg.length > 0 ? styleV2.warningColor : - styleV2.forestColor) : styleV2.transparentColor + color: (errorMsg.length > 0 || warningMsg.length > 0) ? StyleV2.errorBgInputColor : StyleV2.whiteColor + border.color: (combobox.activeFocus || combobox.hovered) ? (errorMsg.length > 0 ? StyleV2.negativeColor : + warningMsg.length > 0 ? StyleV2.warningColor : + StyleV2.forestColor) : StyleV2.transparentColor border.width: enabled ? (combobox.activeFocus ? 2*__dp : 1*__dp) : 0 radius: parent.height } @@ -77,7 +75,7 @@ Item { } background: Rectangle { - border.color: styleV2.forestColor + border.color: StyleV2.forestColor radius: 2 } } @@ -89,13 +87,13 @@ Item { height: 30 * __dp contentItem: Text { text: modelData - color: combobox.highlightedIndex === index ? styleV2.grassColor : styleV2.forestColor - font: styleV2.p4 + color: combobox.highlightedIndex === index ? StyleV2.grassColor : StyleV2.forestColor + font: StyleV2.p4 elide: Text.ElideRight verticalAlignment: Text.AlignVCenter } background: Rectangle { - border.color: styleV2.whiteColor + border.color: StyleV2.whiteColor } } @@ -119,13 +117,13 @@ Item { MMIcon { id: msgIcon - source: visible ? styleV2.errorIcon : "" - color: errorMsg.length > 0 ? styleV2.negativeColor : styleV2.warningColor + source: visible ? StyleV2.errorIcon : "" + color: errorMsg.length > 0 ? StyleV2.negativeColor : StyleV2.warningColor visible: errorMsg.length > 0 || warningMsg.length > 0 } Text { text: errorMsg.length > 0 ? errorMsg : warningMsg - font: styleV2.t4 + font: StyleV2.t4 wrapMode: Text.WordWrap width: messageItem.width - msgRow.spacing - msgIcon.width visible: errorMsg.length > 0 || warningMsg.length > 0 diff --git a/app/qmlV2/component/MMComponent_reachedDataLimit.qml b/app/qmlV2/component/MMComponent_reachedDataLimit.qml index 23848cfbd..aa24f5398 100644 --- a/app/qmlV2/component/MMComponent_reachedDataLimit.qml +++ b/app/qmlV2/component/MMComponent_reachedDataLimit.qml @@ -24,8 +24,6 @@ Item { width: parent.width - StyleV2 { id: styleV2 } - Component { id: component @@ -41,8 +39,8 @@ Item { Text { width: parent.width text: qsTr("Data to sync") - font: styleV2.p5 - color: styleV2.nightColor + font: StyleV2.p5 + color: StyleV2.nightColor horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } @@ -51,14 +49,14 @@ Item { width: parent.width text: control.dataToSync - font: styleV2.t3 - color: styleV2.nightColor + font: StyleV2.t3 + color: StyleV2.nightColor horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } } - Rectangle { width: parent.width; height: 1; color: styleV2.grayColor } + Rectangle { width: parent.width; height: 1; color: StyleV2.grayColor } Item { width: parent.width @@ -67,8 +65,8 @@ Item { Text { width: parent.width text: qsTr("Using") - font: styleV2.p5 - color: styleV2.nightColor + font: StyleV2.p5 + color: StyleV2.nightColor horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } @@ -77,8 +75,8 @@ Item { width: parent.width text: control.dataUsing - font: styleV2.t3 - color: styleV2.nightColor + font: StyleV2.t3 + color: StyleV2.nightColor horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } @@ -88,7 +86,7 @@ Item { position: control.usedData } - Rectangle { width: parent.width; height: 1; color: styleV2.grayColor } + Rectangle { width: parent.width; height: 1; color: StyleV2.grayColor } Item { width: parent.width @@ -97,8 +95,8 @@ Item { Text { width: parent.width text: qsTr("Plan") - font: styleV2.p5 - color: styleV2.nightColor + font: StyleV2.p5 + color: StyleV2.nightColor horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } @@ -107,8 +105,8 @@ Item { width: parent.width text: control.plan - font: styleV2.t3 - color: styleV2.nightColor + font: StyleV2.t3 + color: StyleV2.nightColor horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } diff --git a/app/qmlV2/component/MMDrawer.qml b/app/qmlV2/component/MMDrawer.qml index 1fd9131b7..7eac765cd 100644 --- a/app/qmlV2/component/MMDrawer.qml +++ b/app/qmlV2/component/MMDrawer.qml @@ -31,8 +31,6 @@ Drawer { height: mainColumn.height edge: Qt.BottomEdge - StyleV2 { id: styleV2 } - Rectangle { color: roundedRect.color anchors.top: parent.top @@ -47,7 +45,7 @@ Drawer { id: roundedRect anchors.fill: parent - color: styleV2.whiteColor + color: StyleV2.whiteColor Column { id: mainColumn @@ -61,7 +59,7 @@ Drawer { Image { id: closeButton - source: styleV2.closeButtonIcon + source: StyleV2.closeButtonIcon anchors.right: parent.right anchors.rightMargin: 20 * __dp @@ -81,9 +79,9 @@ Drawer { id: title anchors.horizontalCenter: parent.horizontalCenter - font: styleV2.t1 + font: StyleV2.t1 width: parent.width - 2*20 * __dp - color: styleV2.forestColor + color: StyleV2.forestColor visible: text.length > 0 horizontalAlignment: Text.AlignHCenter } @@ -92,9 +90,9 @@ Drawer { id: description anchors.horizontalCenter: parent.horizontalCenter - font: styleV2.p5 + font: StyleV2.p5 width: parent.width - 2*20 * __dp - color: styleV2.nightColor + color: StyleV2.nightColor visible: text.length > 0 horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap @@ -107,15 +105,15 @@ Drawer { width: parent.width - 2*20 * __dp height: boundedDescription.height radius: 16 * __dp - color: styleV2.lightGreenColor + color: StyleV2.lightGreenColor Text { id: boundedDescription anchors.horizontalCenter: parent.horizontalCenter - font: styleV2.p6 + font: StyleV2.p6 width: parent.width - color: styleV2.nightColor + color: StyleV2.nightColor visible: text.length > 0 horizontalAlignment: Text.AlignLeft wrapMode: Text.WordWrap diff --git a/app/qmlV2/component/MMIcon.qml b/app/qmlV2/component/MMIcon.qml index 9a2295b49..e9cbacc5f 100644 --- a/app/qmlV2/component/MMIcon.qml +++ b/app/qmlV2/component/MMIcon.qml @@ -20,12 +20,10 @@ Item { width: icon.implicitWidth height: icon.implicitHeight - StyleV2 { id: styleV2 } - Image { id: icon - source: styleV2.arrowLinkRightIcon + source: StyleV2.arrowLinkRightIcon anchors.centerIn: control } diff --git a/app/qmlV2/component/MMInput.qml b/app/qmlV2/component/MMInput.qml index fa7161d68..25570693f 100644 --- a/app/qmlV2/component/MMInput.qml +++ b/app/qmlV2/component/MMInput.qml @@ -25,13 +25,11 @@ Column { spacing: 6 * __dp width: 280 * __dp - StyleV2 { id: styleV2 } - Text { id: titleItem width: parent.width - font: styleV2.p6 + font: StyleV2.p6 wrapMode: Text.WordWrap visible: text.length > 0 } @@ -41,8 +39,8 @@ Column { height: 40 * __dp width: parent.width - color: (errorMsg.length > 0 || warningMsg.length > 0) ? styleV2.errorBgInputColor : styleV2.whiteColor - border.color: errorMsg.length > 0 ? styleV2.negativeColor : warningMsg.length > 0 ? styleV2.warningColor : styleV2.forestColor + color: (errorMsg.length > 0 || warningMsg.length > 0) ? StyleV2.errorBgInputColor : StyleV2.whiteColor + border.color: errorMsg.length > 0 ? StyleV2.negativeColor : warningMsg.length > 0 ? StyleV2.warningColor : StyleV2.forestColor border.width: enabled ? (textField.activeFocus ? 2*__dp : textField.hovered ? 1*__dp : 0) : 0 radius: parent.height @@ -56,9 +54,9 @@ Column { id: leftIcon source: control.iconSource - color: errorMsg.length > 0 ? styleV2.negativeColor : - warningMsg.length > 0 ? styleV2.warningColor : - control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + color: errorMsg.length > 0 ? StyleV2.negativeColor : + warningMsg.length > 0 ? StyleV2.warningColor : + control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor height: rect.height } @@ -70,13 +68,13 @@ Column { - (leftIcon.visible ? leftIcon.width : 0) - (clearButton.visible ? clearButton.width : 0) height: rect.height - 4 * __dp - color: control.enabled ? styleV2.nightColor : styleV2.mediumGreenColor - placeholderTextColor: styleV2.nightAlphaColor - font: styleV2.p5 + color: control.enabled ? StyleV2.nightColor : StyleV2.mediumGreenColor + placeholderTextColor: StyleV2.nightAlphaColor + font: StyleV2.p5 hoverEnabled: true anchors.verticalCenter: parent.verticalCenter background: Rectangle { - color: styleV2.transparentColor + color: StyleV2.transparentColor } } @@ -84,8 +82,8 @@ Column { id: clearButton property bool pressed: false - source: styleV2.xMarkIcon - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + source: StyleV2.xMarkIcon + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor width: visible ? height : 0 height: rect.height visible: textField.activeFocus && textField.text.length>0 @@ -112,13 +110,13 @@ Column { MMIcon { id: msgIcon - source: visible ? styleV2.errorIcon : "" - color: errorMsg.length > 0 ? styleV2.negativeColor : styleV2.warningColor + source: visible ? StyleV2.errorIcon : "" + color: errorMsg.length > 0 ? StyleV2.negativeColor : StyleV2.warningColor visible: errorMsg.length > 0 || warningMsg.length > 0 } Text { text: errorMsg.length > 0 ? errorMsg : warningMsg - font: styleV2.t4 + font: StyleV2.t4 wrapMode: Text.WordWrap width: messageItem.width - msgRow.spacing - msgIcon.width visible: errorMsg.length > 0 || warningMsg.length > 0 diff --git a/app/qmlV2/component/MMLink.qml b/app/qmlV2/component/MMLink.qml index 7765925c1..404b1c70c 100644 --- a/app/qmlV2/component/MMLink.qml +++ b/app/qmlV2/component/MMLink.qml @@ -16,8 +16,6 @@ import ".." Button { id: control - StyleV2 { id: styleV2 } - contentItem: Row { anchors.centerIn: control spacing: 10 * __dp @@ -25,9 +23,9 @@ Button { Text { id: text - font: styleV2.t3 + font: StyleV2.t3 text: control.text - color: control.enabled ? control.down || control.hovered ? styleV2.nightColor : styleV2.forestColor : styleV2.mediumGreenColor + color: control.enabled ? control.down || control.hovered ? StyleV2.nightColor : StyleV2.forestColor : StyleV2.mediumGreenColor horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter elide: Text.ElideRight @@ -35,12 +33,12 @@ Button { } MMIcon { - source: styleV2.arrowLinkRightIcon + source: StyleV2.arrowLinkRightIcon color: text.color } } background: Rectangle { - color: styleV2.transparentColor + color: StyleV2.transparentColor } } diff --git a/app/qmlV2/component/MMLinkButton.qml b/app/qmlV2/component/MMLinkButton.qml index 799d81e25..97eeea96a 100644 --- a/app/qmlV2/component/MMLinkButton.qml +++ b/app/qmlV2/component/MMLinkButton.qml @@ -16,25 +16,23 @@ import ".." Button { id: control - StyleV2 { id: styleV2 } - contentItem: Text { anchors.centerIn: control - font: styleV2.t3 + font: StyleV2.t3 text: control.text leftPadding: 32 * __dp rightPadding: 32 * __dp topPadding: 10 * __dp bottomPadding: 10 * __dp - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } background: Rectangle { - color: control.enabled ? control.down || control.hovered ? styleV2.grassColor : styleV2.whiteColor : styleV2.whiteColor - border.color: control.enabled ? control.down || control.hovered ? styleV2.transparentColor : styleV2.forestColor : styleV2.mediumGreenColor + color: control.enabled ? control.down || control.hovered ? StyleV2.grassColor : StyleV2.whiteColor : StyleV2.whiteColor + border.color: control.enabled ? control.down || control.hovered ? StyleV2.transparentColor : StyleV2.forestColor : StyleV2.mediumGreenColor border.width: 2 * __dp radius: height / 2 } diff --git a/app/qmlV2/component/MMMapButton.qml b/app/qmlV2/component/MMMapButton.qml index 1d6b82284..d1c9cb69b 100644 --- a/app/qmlV2/component/MMMapButton.qml +++ b/app/qmlV2/component/MMMapButton.qml @@ -14,19 +14,17 @@ Item { id: control width: height - height: styleV2.mapItemHeight + height: StyleV2.mapItemHeight property alias iconSource: icon.source signal clicked - StyleV2 { id: styleV2 } - Rectangle { width: parent.width height: parent.height radius: control.height / 2 - color: styleV2.whiteColor + color: StyleV2.whiteColor layer.enabled: true layer.effect: MMShadow {} @@ -35,7 +33,7 @@ Item { id: icon anchors.centerIn: parent - color: styleV2.forestColor + color: StyleV2.forestColor } MouseArea { diff --git a/app/qmlV2/component/MMMapLabel.qml b/app/qmlV2/component/MMMapLabel.qml index 9a81ca4d2..e80a53004 100644 --- a/app/qmlV2/component/MMMapLabel.qml +++ b/app/qmlV2/component/MMMapLabel.qml @@ -15,16 +15,14 @@ Item { id: control width: text.width - height: styleV2.mapItemHeight + height: StyleV2.mapItemHeight signal clicked required property string text property url iconSource: "" - property color bgColor: styleV2.positiveColor - property color textColor: styleV2.forestColor - - StyleV2 { id: styleV2 } + property color bgColor: StyleV2.positiveColor + property color textColor: StyleV2.forestColor Rectangle { width: row.width @@ -57,7 +55,7 @@ Item { color: control.textColor text: control.text - font: styleV2.t3 + font: StyleV2.t3 verticalAlignment: Text.AlignVCenter height: parent.height } diff --git a/app/qmlV2/component/MMMenuDrawer.qml b/app/qmlV2/component/MMMenuDrawer.qml index e3bf28aae..acf85445e 100644 --- a/app/qmlV2/component/MMMenuDrawer.qml +++ b/app/qmlV2/component/MMMenuDrawer.qml @@ -25,8 +25,6 @@ Drawer { height: mainColumn.height edge: Qt.BottomEdge - StyleV2 { id: styleV2 } - Rectangle { color: roundedRect.color anchors.top: parent.top @@ -41,7 +39,7 @@ Drawer { id: roundedRect anchors.fill: parent - color: styleV2.whiteColor + color: StyleV2.whiteColor Column { id: mainColumn @@ -55,7 +53,7 @@ Drawer { Image { id: closeButton - source: styleV2.closeButtonIcon + source: StyleV2.closeButtonIcon anchors.right: parent.right anchors.rightMargin: 20 * __dp @@ -69,9 +67,9 @@ Drawer { id: title anchors.horizontalCenter: parent.horizontalCenter - font: styleV2.t1 + font: StyleV2.t1 width: parent.width - 40 * __dp - color: styleV2.forestColor + color: StyleV2.forestColor visible: text.length > 0 horizontalAlignment: Text.AlignHCenter } @@ -80,9 +78,9 @@ Drawer { id: menuView width: parent.width - 40 * __dp - height: model ? model.count * styleV2.menuDrawerHeight : 0 + height: model ? model.count * StyleV2.menuDrawerHeight : 0 cellWidth: width - cellHeight: styleV2.menuDrawerHeight + cellHeight: StyleV2.menuDrawerHeight interactive: false } } diff --git a/app/qmlV2/component/MMNotification.qml b/app/qmlV2/component/MMNotification.qml index aeb75e961..c97a579e5 100644 --- a/app/qmlV2/component/MMNotification.qml +++ b/app/qmlV2/component/MMNotification.qml @@ -23,16 +23,14 @@ Rectangle { radius: 12 * __dp color: { switch( type ) { - case NotificationType.Information: return styleV2.informativeColor - case NotificationType.Success: return styleV2.positiveColor - case NotificationType.Warning: return styleV2.warningColor - case NotificationType.Error: return styleV2.negativeColor - default: return styleV2.positiveColor + case NotificationType.Information: return StyleV2.informativeColor + case NotificationType.Success: return StyleV2.positiveColor + case NotificationType.Warning: return StyleV2.warningColor + case NotificationType.Error: return StyleV2.negativeColor + default: return StyleV2.positiveColor } } - StyleV2 { id: styleV2 } - MMIcon { id: leftIcon @@ -45,9 +43,9 @@ Rectangle { visible: icon !== NotificationType.None source: { switch( icon ) { - case NotificationType.None: return styleV2.checkmarkIcon - case NotificationType.Waiting: return styleV2.waitingIcon - case NotificationType.Check: return styleV2.checkmarkIcon + case NotificationType.None: return StyleV2.checkmarkIcon + case NotificationType.Waiting: return StyleV2.waitingIcon + case NotificationType.Check: return StyleV2.checkmarkIcon } } } @@ -62,7 +60,7 @@ Rectangle { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft leftPadding: 20 * __dp - notification.innerSpacing - font: styleV2.t3 + font: StyleV2.t3 clip: true maximumLineCount: 3 wrapMode: Text.WordWrap @@ -70,10 +68,10 @@ Rectangle { elide: Text.ElideRight color: { switch( type ) { - case NotificationType.Information: return styleV2.deepOceanColor - case NotificationType.Success: return styleV2.forestColor - case NotificationType.Warning: return styleV2.earthColor - case NotificationType.Error: return styleV2.grapeColor + case NotificationType.Information: return StyleV2.deepOceanColor + case NotificationType.Success: return StyleV2.forestColor + case NotificationType.Warning: return StyleV2.earthColor + case NotificationType.Error: return StyleV2.grapeColor } } } @@ -85,7 +83,7 @@ Rectangle { anchors.rightMargin: 20 * __dp anchors.verticalCenter: parent.verticalCenter scale: maRemove.containsMouse ? 1.2 : 1 - source: styleV2.closeIcon + source: StyleV2.closeIcon color: text.color MouseArea { diff --git a/app/qmlV2/component/MMNotificationView.qml b/app/qmlV2/component/MMNotificationView.qml index 9d9e9113e..7a8119e8f 100644 --- a/app/qmlV2/component/MMNotificationView.qml +++ b/app/qmlV2/component/MMNotificationView.qml @@ -18,19 +18,17 @@ Item { width: parent.width height: parent.height - StyleV2 { id: styleV2 } - // just for information - will be removed in release version Rectangle { anchors.bottom: parent.bottom width: control.width height: 20 - color: styleV2.whiteColor + color: StyleV2.whiteColor Text { text: listView.count anchors.centerIn: parent - color: styleV2.forestColor + color: StyleV2.forestColor } } diff --git a/app/qmlV2/component/MMPasswordInput.qml b/app/qmlV2/component/MMPasswordInput.qml index 4e476cb3a..5d1eb0aeb 100644 --- a/app/qmlV2/component/MMPasswordInput.qml +++ b/app/qmlV2/component/MMPasswordInput.qml @@ -26,13 +26,11 @@ Column { spacing: 6 * __dp width: 280 * __dp - StyleV2 { id: styleV2 } - Text { id: titleItem width: parent.width - font: styleV2.p6 + font: StyleV2.p6 wrapMode: Text.WordWrap visible: text.length > 0 } @@ -42,8 +40,8 @@ Column { height: 40 * __dp width: parent.width - color: (errorMsg.length > 0 || warningMsg.length > 0) ? styleV2.errorBgInputColor : styleV2.whiteColor - border.color: isPasswordCorrect(textField.text) ? styleV2.forestColor : errorMsg.length > 0 ? styleV2.negativeColor : warningMsg.length > 0 ? styleV2.warningColor : styleV2.forestColor + color: (errorMsg.length > 0 || warningMsg.length > 0) ? StyleV2.errorBgInputColor : StyleV2.whiteColor + border.color: isPasswordCorrect(textField.text) ? StyleV2.forestColor : errorMsg.length > 0 ? StyleV2.negativeColor : warningMsg.length > 0 ? StyleV2.warningColor : StyleV2.forestColor border.width: enabled ? (textField.activeFocus ? 2*__dp : textField.hovered ? 1*__dp : 0) : 0 radius: parent.height @@ -57,9 +55,9 @@ Column { id: leftIcon source: control.iconSource - color: errorMsg.length > 0 ? styleV2.negativeColor : - warningMsg.length > 0 ? styleV2.warningColor : - control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + color: errorMsg.length > 0 ? StyleV2.negativeColor : + warningMsg.length > 0 ? StyleV2.warningColor : + control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor height: rect.height } @@ -71,14 +69,14 @@ Column { - (leftIcon.visible ? leftIcon.width : 0) - (eyeButton.visible ? eyeButton.width : 0) height: rect.height - 4 * __dp - color: control.enabled ? styleV2.nightColor : styleV2.mediumGreenColor - placeholderTextColor: styleV2.nightAlphaColor - font: styleV2.p5 + color: control.enabled ? StyleV2.nightColor : StyleV2.mediumGreenColor + placeholderTextColor: StyleV2.nightAlphaColor + font: StyleV2.p5 hoverEnabled: true anchors.verticalCenter: parent.verticalCenter echoMode: eyeButton.pressed ? TextInput.Normal : TextInput.Password background: Rectangle { - color: styleV2.transparentColor + color: StyleV2.transparentColor } } @@ -86,8 +84,8 @@ Column { id: eyeButton property bool pressed: false - source: pressed ? styleV2.hideIcon : styleV2.showIcon - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + source: pressed ? StyleV2.hideIcon : StyleV2.showIcon + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor width: visible ? height : 0 height: rect.height @@ -113,15 +111,15 @@ Column { MMIcon { id: msgIcon - source: visible ? styleV2.errorIcon : "" - color: errorMsg.length > 0 ? styleV2.negativeColor : styleV2.warningColor + source: visible ? StyleV2.errorIcon : "" + color: errorMsg.length > 0 ? StyleV2.negativeColor : StyleV2.warningColor visible: msg.visible } Text { id: msg text: errorMsg.length > 0 ? errorMsg : warningMsg - font: styleV2.t4 + font: StyleV2.t4 wrapMode: Text.WordWrap width: messageItem.width - msgRow.spacing - msgIcon.width visible: (errorMsg.length > 0 || warningMsg.length > 0) && !isPasswordCorrect(textField.text) diff --git a/app/qmlV2/component/MMProgressBar.qml b/app/qmlV2/component/MMProgressBar.qml index cbb2b3909..34551d757 100644 --- a/app/qmlV2/component/MMProgressBar.qml +++ b/app/qmlV2/component/MMProgressBar.qml @@ -16,8 +16,6 @@ Rectangle { required property real position // [0 - 1] - StyleV2 { id: styleV2 } - width: parent.width height: 12 * __dp color: StyleV2.lightGreenColor diff --git a/app/qmlV2/component/MMRadioButton.qml b/app/qmlV2/component/MMRadioButton.qml index 413377ffa..9cec03ab8 100644 --- a/app/qmlV2/component/MMRadioButton.qml +++ b/app/qmlV2/component/MMRadioButton.qml @@ -17,31 +17,29 @@ RadioButton { checked: true - StyleV2 { id: styleV2 } - indicator: Rectangle { implicitWidth: 24 implicitHeight: 24 x: control.leftPadding y: parent.height / 2 - height / 2 radius: 12 - color: enabled ? ( control.checked ? styleV2.grassColor: styleV2.whiteColor ) : styleV2.whiteColor - border.color: enabled ? ( control.checked ? styleV2.grassColor: styleV2.forestColor ) : styleV2.mediumGreenColor + color: enabled ? ( control.checked ? StyleV2.grassColor: StyleV2.whiteColor ) : StyleV2.whiteColor + border.color: enabled ? ( control.checked ? StyleV2.grassColor: StyleV2.forestColor ) : StyleV2.mediumGreenColor border.width: control.hovered ? 2.5 : 2 MMIcon { id: icon anchors.centerIn: parent - source: styleV2.checkmarkIcon - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + source: StyleV2.checkmarkIcon + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor visible: control.checked } } contentItem: Text { text: control.text - font: styleV2.p5 + font: StyleV2.p5 color: icon.color verticalAlignment: Text.AlignVCenter leftPadding: control.indicator.width + control.spacing diff --git a/app/qmlV2/component/MMRoundButton.qml b/app/qmlV2/component/MMRoundButton.qml index e93e5f6c9..68ae9ae3b 100644 --- a/app/qmlV2/component/MMRoundButton.qml +++ b/app/qmlV2/component/MMRoundButton.qml @@ -19,17 +19,15 @@ RoundButton { implicitWidth: icon.width * 2 implicitHeight: icon.height * 2 - StyleV2 { id: styleV2 } - contentItem: MMIcon { id: icon - source: styleV2.arrowLinkRightIcon - color: control.enabled ? control.down || control.hovered ? styleV2.grassColor : styleV2.forestColor : styleV2.forestColor + source: StyleV2.arrowLinkRightIcon + color: control.enabled ? control.down || control.hovered ? StyleV2.grassColor : StyleV2.forestColor : StyleV2.forestColor } background: Rectangle { - color: control.enabled ? control.down || control.hovered ? styleV2.forestColor : styleV2.grassColor : styleV2.mediumGreenColor + color: control.enabled ? control.down || control.hovered ? StyleV2.forestColor : StyleV2.grassColor : StyleV2.mediumGreenColor radius: control.implicitHeight / 2 } } diff --git a/app/qmlV2/component/MMRoundLinkButton.qml b/app/qmlV2/component/MMRoundLinkButton.qml index 2a897cc2c..cf1f7cee5 100644 --- a/app/qmlV2/component/MMRoundLinkButton.qml +++ b/app/qmlV2/component/MMRoundLinkButton.qml @@ -19,18 +19,16 @@ RoundButton { implicitWidth: icon.width * 2 implicitHeight: icon.height * 2 - StyleV2 { id: styleV2 } - contentItem: MMIcon { id: icon - source: styleV2.arrowLinkRightIcon - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + source: StyleV2.arrowLinkRightIcon + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor } background: Rectangle { - color: control.enabled ? control.down || control.hovered ? styleV2.grassColor : styleV2.whiteColor : styleV2.whiteColor - border.color: control.enabled ? control.down || control.hovered ? styleV2.transparentColor : styleV2.forestColor : styleV2.mediumGreenColor + color: control.enabled ? control.down || control.hovered ? StyleV2.grassColor : StyleV2.whiteColor : StyleV2.whiteColor + border.color: control.enabled ? control.down || control.hovered ? StyleV2.transparentColor : StyleV2.forestColor : StyleV2.mediumGreenColor border.width: 2 * __dp radius: control.implicitHeight / 2 diff --git a/app/qmlV2/component/MMShadow.qml b/app/qmlV2/component/MMShadow.qml index b87c64f52..9d4363230 100644 --- a/app/qmlV2/component/MMShadow.qml +++ b/app/qmlV2/component/MMShadow.qml @@ -11,14 +11,11 @@ import QtQuick import Qt5Compat.GraphicalEffects import ".." - DropShadow { id: shadow horizontalOffset: 2 * __dp verticalOffset: 3 * __dp radius: 7 * __dp - color: styleV2.shadowColor + color: StyleV2.shadowColor transparentBorder: true - - StyleV2 { id: styleV2 } } diff --git a/app/qmlV2/component/MMSwitch.qml b/app/qmlV2/component/MMSwitch.qml index df7c2445b..0d60b0a96 100644 --- a/app/qmlV2/component/MMSwitch.qml +++ b/app/qmlV2/component/MMSwitch.qml @@ -18,12 +18,10 @@ Switch { property string textOn property string textOff - StyleV2 { id: styleV2 } - contentItem: Text { text: (control.textOn.length > 0 && control.textOff.length > 0) ? (control.checked ? control.textOn : control.textOff) : control.text - font: styleV2.p5 - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + font: StyleV2.p5 + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor verticalAlignment: Text.AlignVCenter leftPadding: control.indicator.width + control.spacing } @@ -34,14 +32,14 @@ Switch { x: control.leftPadding y: parent.height / 2 - height / 2 radius: implicitHeight / 2 - color: control.checked ? styleV2.grassColor : styleV2.whiteColor + color: control.checked ? StyleV2.grassColor : StyleV2.whiteColor Rectangle { x: control.checked ? parent.width - width - radius/2 : radius/2 width: 20 height: width radius: width / 2 - color: control.enabled ? styleV2.forestColor : styleV2.mediumGreenColor + color: control.enabled ? StyleV2.forestColor : StyleV2.mediumGreenColor anchors.verticalCenter: parent.verticalCenter } } diff --git a/app/qmlV2/component/MMTextArea.qml b/app/qmlV2/component/MMTextArea.qml index 1dd0a9892..71c8311f2 100644 --- a/app/qmlV2/component/MMTextArea.qml +++ b/app/qmlV2/component/MMTextArea.qml @@ -29,8 +29,6 @@ Item { width: 280 * __dp height: textArea.height + messageItem.height - StyleV2 { id: styleV2 } - TextArea { id: textArea @@ -40,15 +38,15 @@ Item { height: control.autoHeight ? ( contentHeight+10 > control.minHeight ? contentHeight+10 > control.maxHeight ? control.maxHeight : contentHeight+10 : control.minHeight ) : control.areaHeight width: parent.width hoverEnabled: true - placeholderTextColor: styleV2.nightAlphaColor - color: control.enabled ? styleV2.nightColor : styleV2.mediumGreenColor - font: styleV2.p5 + placeholderTextColor: StyleV2.nightAlphaColor + color: control.enabled ? StyleV2.nightColor : StyleV2.mediumGreenColor + font: StyleV2.p5 background: Rectangle { - color: (errorMsg.length > 0 || warningMsg.length > 0) ? styleV2.errorBgInputColor : styleV2.whiteColor - border.color: (textArea.activeFocus || textArea.hovered) ? (errorMsg.length > 0 ? styleV2.negativeColor : - warningMsg.length > 0 ? styleV2.warningColor : - styleV2.forestColor) : styleV2.transparentColor + color: (errorMsg.length > 0 || warningMsg.length > 0) ? StyleV2.errorBgInputColor : StyleV2.whiteColor + border.color: (textArea.activeFocus || textArea.hovered) ? (errorMsg.length > 0 ? StyleV2.negativeColor : + warningMsg.length > 0 ? StyleV2.warningColor : + StyleV2.forestColor) : StyleV2.transparentColor border.width: enabled ? (textArea.activeFocus ? 2*__dp : 1*__dp) : 0 radius: 10 * __dp } @@ -71,13 +69,13 @@ Item { MMIcon { id: msgIcon - source: visible ? styleV2.errorIcon : "" - color: errorMsg.length > 0 ? styleV2.negativeColor : styleV2.warningColor + source: visible ? StyleV2.errorIcon : "" + color: errorMsg.length > 0 ? StyleV2.negativeColor : StyleV2.warningColor visible: errorMsg.length > 0 || warningMsg.length > 0 } Text { text: errorMsg.length > 0 ? errorMsg : warningMsg - font: styleV2.t4 + font: StyleV2.t4 wrapMode: Text.WordWrap width: messageItem.width - msgRow.spacing - msgIcon.width visible: errorMsg.length > 0 || warningMsg.length > 0 diff --git a/app/qmlV2/component/MMToolbar.qml b/app/qmlV2/component/MMToolbar.qml index 781315e32..6339042cf 100644 --- a/app/qmlV2/component/MMToolbar.qml +++ b/app/qmlV2/component/MMToolbar.qml @@ -25,13 +25,11 @@ Rectangle { right: parent.right bottom: parent.bottom } - height: styleV2.toolbarHeight - color: styleV2.forestColor + height: StyleV2.toolbarHeight + color: StyleV2.forestColor onWidthChanged: setupBottomBar() - StyleV2 { id: styleV2 } - // buttons shown inside toolbar ObjectModel { id: visibleButtonModel @@ -49,7 +47,7 @@ Rectangle { anchors.fill: parent leftMargin: 20 * __dp rightMargin: 20 * __dp - cellHeight: styleV2.toolbarHeight + cellHeight: StyleV2.toolbarHeight interactive: false } @@ -69,7 +67,7 @@ Rectangle { id: componentMore MMToolbarButton { text: qsTr("More") - iconSource: styleV2.moreIcon + iconSource: StyleV2.moreIcon onClicked: menu.visible = true } } diff --git a/app/qmlV2/component/MMToolbarButton.qml b/app/qmlV2/component/MMToolbarButton.qml index 063fba2b8..75c92d314 100644 --- a/app/qmlV2/component/MMToolbarButton.qml +++ b/app/qmlV2/component/MMToolbarButton.qml @@ -24,16 +24,14 @@ Item { enum Button { Normal, Save } - height: isMenuButton ? styleV2.menuDrawerHeight/2 : styleV2.toolbarHeight - - StyleV2 { id: styleV2 } + height: isMenuButton ? StyleV2.menuDrawerHeight/2 : StyleV2.toolbarHeight Rectangle { width: parent.width - 10 * __dp height: parent.height - 10 * __dp anchors.centerIn: parent clip: control.type !== MMToolbarButton.Button.Save - color: styleV2.transparentColor + color: StyleV2.transparentColor visible: !control.isMenuButton Image { @@ -50,8 +48,8 @@ Item { width: 56 * __dp height: width radius: width / 2 - color: styleV2.transparentColor - border.color: styleV2.grassColor + color: StyleV2.transparentColor + border.color: StyleV2.grassColor border.width: 14 * __dp } } @@ -60,8 +58,8 @@ Item { text: control.text width: parent.width - color: styleV2.whiteColor - font: styleV2.t4 + color: StyleV2.whiteColor + font: StyleV2.t4 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 20 * __dp @@ -77,7 +75,7 @@ Item { // Menu button MMToolbarMenuButton { width: control.width - height: styleV2.menuDrawerHeight + height: StyleV2.menuDrawerHeight visible: control.isMenuButton iconSource: control.iconSource text: control.text diff --git a/app/qmlV2/component/MMToolbarLongButton.qml b/app/qmlV2/component/MMToolbarLongButton.qml index 767b771b0..c1c75801c 100644 --- a/app/qmlV2/component/MMToolbarLongButton.qml +++ b/app/qmlV2/component/MMToolbarLongButton.qml @@ -24,9 +24,7 @@ Item { readonly property double minimumToolbarLongButtonWidth: 200 * __dp readonly property double maximumToolbarLongButtonWidth: 500 * __dp - height: styleV2.toolbarHeight - - StyleV2 { id: styleV2 } + height: StyleV2.toolbarHeight Button { width: { @@ -59,8 +57,8 @@ Item { id: text text: control.text - color: styleV2.forestColor - font: styleV2.t3 + color: StyleV2.forestColor + font: StyleV2.t3 verticalAlignment: Text.AlignVCenter topPadding: 10 * __dp bottomPadding: 10 * __dp @@ -69,7 +67,7 @@ Item { } background: Rectangle { - color: styleV2.grassColor + color: StyleV2.grassColor radius: height / 2 } diff --git a/app/qmlV2/component/MMToolbarMenuButton.qml b/app/qmlV2/component/MMToolbarMenuButton.qml index 0e13b05d8..1471e9203 100644 --- a/app/qmlV2/component/MMToolbarMenuButton.qml +++ b/app/qmlV2/component/MMToolbarMenuButton.qml @@ -20,19 +20,17 @@ Item { required property var iconSource required property string text - StyleV2 { id: styleV2 } - Item { id: menuButton width: control.width - height: styleV2.menuDrawerHeight + height: StyleV2.menuDrawerHeight Rectangle { anchors.top: parent.top width: parent.width height: 1 * __dp - color: styleV2.grayColor + color: StyleV2.grayColor } Row { @@ -41,13 +39,13 @@ Item { spacing: 20 * __dp MMIcon { height: parent.height - color: styleV2.forestColor + color: StyleV2.forestColor source: control.iconSource } Text { text: control.text - color: styleV2.forestColor - font: styleV2.t3 + color: StyleV2.forestColor + font: StyleV2.t3 verticalAlignment: Text.AlignVCenter height: parent.height } diff --git a/gallery/qml/pages/DrawerPage.qml b/gallery/qml/pages/DrawerPage.qml index 7513853f2..412c1b5e4 100644 --- a/gallery/qml/pages/DrawerPage.qml +++ b/gallery/qml/pages/DrawerPage.qml @@ -17,8 +17,6 @@ import "../../app/qmlV2" Page { id: pane - StyleV2 { id: styleV2 } - Column { width: parent.width spacing: 10 @@ -40,7 +38,7 @@ Page { MMDrawer { id: drawer1 - picture: styleV2.uploadImage + picture: StyleV2.uploadImage title: "Upload project to Margin?" description: "This project is currently not uploaded on Mergin. Upload it to Mergin in order to activate synchronization and collaboration." primaryButton: "Yes, Upload Project" @@ -53,7 +51,7 @@ Page { MMDrawer { id: drawer2 - picture: styleV2.reachedDataLimitImage + picture: StyleV2.reachedDataLimitImage title: "You have reached a data limit" primaryButton: "Manage Subscription" specialComponent: component.comp @@ -74,7 +72,7 @@ Page { MMDrawer { id: drawer3 - picture: styleV2.uploadImage + picture: StyleV2.uploadImage title: "Failed to synchronize your changes" description: "Your changes could not be sent to server, make sure you are connected to internet and have write access to this project." primaryButton: "Ok, I understand" diff --git a/gallery/qml/pages/InitialGalleryPage.qml b/gallery/qml/pages/InitialGalleryPage.qml index c845e3ec2..c6e0b96e5 100644 --- a/gallery/qml/pages/InitialGalleryPage.qml +++ b/gallery/qml/pages/InitialGalleryPage.qml @@ -10,8 +10,6 @@ import QtQuick import QtQuick.Controls -import "../../app/qmlV2/component" - Page { id: pane diff --git a/gallery/qml/pages/InputsPage.qml b/gallery/qml/pages/InputsPage.qml index abc4a1904..ba17f2693 100644 --- a/gallery/qml/pages/InputsPage.qml +++ b/gallery/qml/pages/InputsPage.qml @@ -15,9 +15,6 @@ import "../../app/qmlV2/component" import "../../app/qmlV2/" ScrollView { - - StyleV2 { id: styleV2 } - Column { padding: 20 spacing: 20 @@ -50,13 +47,13 @@ ScrollView { MMInput { title: "Search ..." placeholderText: "Search" - iconSource: styleV2.searchIcon + iconSource: StyleV2.searchIcon } } Column { MMInput { text: "Calendar" - iconSource: styleV2.calendarIcon + iconSource: StyleV2.calendarIcon warningMsg: "Would you like to be so kind and select a date please?" } } diff --git a/gallery/qml/pages/MapPage.qml b/gallery/qml/pages/MapPage.qml index f516f0505..03afd9502 100644 --- a/gallery/qml/pages/MapPage.qml +++ b/gallery/qml/pages/MapPage.qml @@ -19,8 +19,6 @@ import "../../app/qmlV2/" Page { id: pane - StyleV2 { id: styleV2 } - Plugin { id: mapPlugin name: "osm" @@ -100,12 +98,12 @@ Page { spacing: 20 MMMapButton { - iconSource: styleV2.arrowLinkRightIcon + iconSource: StyleV2.arrowLinkRightIcon onClicked: console.log("Map button clicked") } MMMapButton { - iconSource: styleV2.searchIcon + iconSource: StyleV2.searchIcon onClicked: console.log("Map button clicked") } } @@ -117,7 +115,7 @@ Page { anchors.bottomMargin: 120 text: "20.0 m" - iconSource: styleV2.checkmarkIcon + iconSource: StyleV2.checkmarkIcon } MMMapLabel { diff --git a/gallery/qml/pages/ToolbarPage.qml b/gallery/qml/pages/ToolbarPage.qml index 8895e144a..f0ad0a502 100644 --- a/gallery/qml/pages/ToolbarPage.qml +++ b/gallery/qml/pages/ToolbarPage.qml @@ -16,42 +16,40 @@ import "../../app/qmlV2/" Page { id: pane - StyleV2 { id: styleV2 } - MMToolbar { model: ObjectModel { - MMToolbarLongButton { text: "Long button"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarLongButton { text: "Long button"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } } anchors.bottomMargin: 360 * __dp } MMToolbar { model: ObjectModel { - MMToolbarButton { text: "aaa"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: "bbb"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "aaa"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "bbb"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } } anchors.bottomMargin: 240 * __dp } MMToolbar { model: ObjectModel { - MMToolbarButton { text: "1/8"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: "2/8"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: "3/8"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: "4/8"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: "5/8"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: "6/8"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: "7/8"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: "8/8"; iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "1/8"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "2/8"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "3/8"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "4/8"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "5/8"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "6/8"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "7/8"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: "8/8"; iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } } anchors.bottomMargin: 120 * __dp } MMToolbar { model: ObjectModel { - MMToolbarButton { text: qsTr("Delete"); iconSource: styleV2.deleteIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: qsTr("Edit Geometry"); iconSource: styleV2.editIcon; onClicked: console.log("tapped "+text) } - MMToolbarButton { text: qsTr("Save"); iconSource: styleV2.doneIcon; type: MMToolbarButton.Button.Save; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: qsTr("Delete"); iconSource: StyleV2.deleteIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: qsTr("Edit Geometry"); iconSource: StyleV2.editIcon; onClicked: console.log("tapped "+text) } + MMToolbarButton { text: qsTr("Save"); iconSource: StyleV2.doneIcon; type: MMToolbarButton.Button.Save; onClicked: console.log("tapped "+text) } } } }