added PageSetupWizardCredentials and PageSetupWizardProtocols

- fixed hover and pressed effects for controls
This commit is contained in:
vladimir.kuznetsov 2023-04-14 19:31:10 +03:00
parent 905a3a30f3
commit 3d63d6c0f2
12 changed files with 314 additions and 68 deletions

View file

@ -9,16 +9,17 @@ RadioButton {
property string bodyText
property string footerText
property string hoveredColor: Qt.rgba(255, 255, 255, 0.05)
property string defaultColor: Qt.rgba(255, 255, 255, 0)
property string disabledColor: Qt.rgba(255, 255, 255, 0)
property string pressedColor: Qt.rgba(255, 255, 255, 0.05)
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05)
property string defaultColor: Qt.rgba(1, 1, 1, 0)
property string disabledColor: Qt.rgba(1, 1, 1, 0)
property string pressedColor: Qt.rgba(1, 1, 1, 0.05)
property string selectedColor: Qt.rgba(1, 1, 1, 0)
property string textColor: "#0E0E11"
property string pressedBorderColor: Qt.rgba(251, 178, 106, 0.3)
property string hoveredBorderColor: "transparent"
property string defaultBodredColor: "#FBB26A"
property string pressedBorderColor: Qt.rgba(251/255, 178/255, 106/255, 0.3)
property string selectedBorderColor: "#FBB26A"
property string defaultBodredColor: "transparent"
property int borderWidth: 0
implicitWidth: content.implicitWidth
@ -32,30 +33,34 @@ RadioButton {
color: {
if (root.enabled) {
if(root.checked) {
return pressedColor
if (root.hovered) {
return hoveredColor
} else if (root.checked) {
return selectedColor
}
return hovered ? hoveredColor : defaultColor
return defaultColor
} else {
return disabledColor
}
}
border.color: {
if (root.enabled) {
if(root.checked) {
if (root.pressed) {
return pressedBorderColor
} else if (root.checked) {
return selectedBorderColor
}
return hovered ? hoveredBorderColor : defaultBodredColor
} else {
return defaultBodredColor
}
return defaultBodredColor
}
border.width: {
if (root.enabled) {
if(root.checked) {
return 1
}
return hovered ? 0 : 1
return root.pressed ? 1 : 0
} else {
return 0
}
@ -64,6 +69,9 @@ RadioButton {
Behavior on color {
PropertyAnimation { duration: 200 }
}
Behavior on border.color {
PropertyAnimation { duration: 200 }
}
}
ColumnLayout {

View file

@ -6,9 +6,9 @@ import Qt5Compat.GraphicalEffects
Item {
id: root
property string hoveredColor: Qt.rgba(255, 255, 255, 0.05)
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05)
property string defaultColor: "transparent"
property string pressedColor: Qt.rgba(255, 255, 255, 0.05)
property string pressedColor: Qt.rgba(1, 1, 1, 0.05)
property string defaultBorderColor: "#D7D8DB"
property string checkedBorderColor: "#FBB26A"

View file

@ -1,40 +1,64 @@
import QtQuick
import QtQuick.Layouts
ColumnLayout {
Item {
id: root
property string buttonImage
property string headerText
property var wrapMode
property string descriptionText
ImageButtonType {
id: button
implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight
Layout.leftMargin: -6
ColumnLayout {
id: content
anchors.fill: parent
hoverEnabled: false
image: root.buttonImage
onClicked: {
if (onClickedFunc && typeof onClickedFunc === "function") {
onClickedFunc()
ImageButtonType {
id: backButton
Layout.leftMargin: -6
image: root.buttonImage
imageColor: "#D7D8DB"
onClicked: {
UiLogic.closePage()
}
}
}
Text {
id: header
Text {
id: header
text: root.headerText
text: root.headerText
color: "#D7D8DB"
font.pixelSize: 36
font.weight: 700
font.family: "PT Root UI VF"
font.letterSpacing: -0.03
color: "#D7D8DB"
font.pixelSize: 36
font.weight: 700
font.family: "PT Root UI VF"
font.letterSpacing: -0.03
wrapMode: Text.WordWrap
wrapMode: Text.WordWrap
height: 38
height: 38
Layout.fillWidth: true
}
Text {
id: description
text: root.descriptionText
color: "#878B91"
font.pixelSize: 16
font.weight: 400
font.family: "PT Root UI VF"
font.letterSpacing: -0.03
wrapMode: Text.WordWrap
height: 24
Layout.fillWidth: true
}
}
}

View file

@ -7,9 +7,9 @@ Button {
property string image
property string hoveredColor: Qt.rgba(255, 255, 255, 0.08)
property string hoveredColor: Qt.rgba(1, 1, 1, 0.08)
property string defaultColor: "transparent"
property string pressedColor: Qt.rgba(255, 255, 255, 0.12)
property string pressedColor: Qt.rgba(1, 1, 1, 0.12)
property string imageColor: "#878B91"

View file

@ -6,24 +6,48 @@ Item {
id: root
property string text
property string descriptionText
property var onClickedFunc
property alias buttonImage : button.image
implicitWidth: 360
implicitHeight: 72
implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight
RowLayout {
id: content
anchors.fill: parent
Text {
font.family: "PT Root UI"
font.styleName: "normal"
font.pixelSize: 18
color: "#d7d8db"
text: root.text
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
ColumnLayout {
Text {
font.family: "PT Root UI"
font.styleName: "normal"
font.pixelSize: 18
color: "#d7d8db"
text: root.text
Layout.fillWidth: true
height: 22
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
Text {
font.family: "PT Root UI"
font.styleName: "normal"
font.pixelSize: 13
font.letterSpacing: 0.02
color: "#878B91"
text: root.descriptionText
wrapMode: Text.WordWrap
Layout.fillWidth: true
height: 16
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
}
ImageButtonType {

View file

@ -18,8 +18,12 @@ Item {
anchors.fill: parent
color: "#1c1d21"
radius: 16
border.color: "#d7d8db"
border.width: textField.focus ? 1 : 0
border.color: textField.focus ? "#d7d8db" : "#2C2D30"
border.width: 1
Behavior on border.color {
PropertyAnimation { duration: 200 }
}
}
ColumnLayout {