Merge branch 'dev' into feature/custom_drawer_component
This commit is contained in:
commit
023c3474d2
96 changed files with 3897 additions and 1733 deletions
|
|
@ -81,6 +81,7 @@ RadioButton {
|
|||
|
||||
Text {
|
||||
text: root.headerText
|
||||
wrapMode: Text.WordWrap
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 25
|
||||
font.weight: 700
|
||||
|
|
@ -110,6 +111,7 @@ RadioButton {
|
|||
|
||||
Text {
|
||||
text: root.footerText
|
||||
wrapMode: Text.WordWrap
|
||||
visible: root.footerText !== ""
|
||||
color: "#878B91"
|
||||
font.pixelSize: 13
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import "../Config"
|
||||
|
||||
Drawer {
|
||||
id: drawer
|
||||
property bool needCloseButton: true
|
||||
|
|
@ -39,6 +41,18 @@ Drawer {
|
|||
|
||||
border.color: "#2C2D30"
|
||||
border.width: 1
|
||||
|
||||
Rectangle {
|
||||
visible: GC.isMobile()
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.topMargin: 10
|
||||
|
||||
width: 20
|
||||
height: 2
|
||||
color: "#2C2D30"
|
||||
}
|
||||
}
|
||||
|
||||
Overlay.modal: Rectangle {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ Item {
|
|||
property bool isLeftImageHoverEnabled: true //todo separete this qml file to 3
|
||||
|
||||
property string textColor: "#d7d8db"
|
||||
property string textDisabledColor: "#878B91"
|
||||
property string descriptionColor: "#878B91"
|
||||
property string descriptionDisabledColor: "#494B50"
|
||||
property real textOpacity: 1.0
|
||||
|
||||
property string rightImageColor: "#d7d8db"
|
||||
|
|
@ -71,7 +73,14 @@ Item {
|
|||
|
||||
ListItemTitleType {
|
||||
text: root.text
|
||||
color: root.descriptionOnTop ? root.descriptionColor : root.textColor
|
||||
color: {
|
||||
if (root.enabled) {
|
||||
return root.descriptionOnTop ? root.descriptionColor : root.textColor
|
||||
} else {
|
||||
return root.descriptionOnTop ? root.descriptionDisabledColor : root.textDisabledColor
|
||||
}
|
||||
}
|
||||
|
||||
maximumLineCount: root.textMaximumLineCount
|
||||
elide: root.textElide
|
||||
|
||||
|
|
@ -96,7 +105,13 @@ Item {
|
|||
id: description
|
||||
|
||||
text: root.descriptionText
|
||||
color: root.descriptionOnTop ? root.textColor : root.descriptionColor
|
||||
color: {
|
||||
if (root.enabled) {
|
||||
return root.descriptionOnTop ? root.textColor : root.descriptionColor
|
||||
} else {
|
||||
return root.descriptionOnTop ? root.textDisabledColor : root.descriptionDisabledColor
|
||||
}
|
||||
}
|
||||
|
||||
opacity: root.textOpacity
|
||||
|
||||
|
|
@ -157,7 +172,7 @@ Item {
|
|||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
hoverEnabled: root.enabled
|
||||
|
||||
onEntered: {
|
||||
if (rightImageSource) {
|
||||
|
|
|
|||
|
|
@ -30,17 +30,13 @@ Switch {
|
|||
property string hoveredIndicatorBackgroundColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
property string defaultIndicatorBackgroundColor: "transparent"
|
||||
|
||||
implicitWidth: content.implicitWidth + switcher.implicitWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
|
||||
hoverEnabled: enabled ? true : false
|
||||
|
||||
indicator: Rectangle {
|
||||
id: switcher
|
||||
|
||||
anchors.left: content.right
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 4
|
||||
|
||||
implicitWidth: 52
|
||||
implicitHeight: 32
|
||||
|
|
@ -90,11 +86,11 @@ Switch {
|
|||
contentItem: ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.rightMargin: switcher.implicitWidth
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
ListItemTitleType {
|
||||
Layout.fillWidth: true
|
||||
rightPadding: indicator.width
|
||||
|
||||
text: root.text
|
||||
color: root.enabled ? root.textColor : root.textDisabledColor
|
||||
|
|
@ -104,6 +100,7 @@ Switch {
|
|||
id: description
|
||||
|
||||
Layout.fillWidth: true
|
||||
rightPadding: indicator.width
|
||||
|
||||
color: root.enabled ? root.descriptionTextColor : root.descriptionTextDisabledColor
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ Item {
|
|||
property string headerTextColor: "#878b91"
|
||||
|
||||
property alias errorText: errorField.text
|
||||
property bool checkEmptyText: false
|
||||
|
||||
property string buttonText
|
||||
property string buttonImageSource
|
||||
|
|
@ -99,6 +100,12 @@ Item {
|
|||
root.errorText = ""
|
||||
}
|
||||
|
||||
onActiveFocusChanged: {
|
||||
if (checkEmptyText && textFieldText === "") {
|
||||
errorText = qsTr("The field can't be empty")
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.RightButton
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue