added output of notifications/errors after installation/import
This commit is contained in:
parent
0411792ca5
commit
1092abe776
39 changed files with 488 additions and 303 deletions
|
|
@ -9,6 +9,11 @@ CheckBox {
|
|||
id: root
|
||||
|
||||
property string descriptionText
|
||||
property string descriptionTextColor: "#878B91"
|
||||
property string descriptionTextDisabledColor: "#494B50"
|
||||
|
||||
property string textColor: "#D7D8DB"
|
||||
property string textDisabledColor: "#878B91"
|
||||
|
||||
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05)
|
||||
property string defaultColor: "transparent"
|
||||
|
|
@ -16,14 +21,16 @@ CheckBox {
|
|||
|
||||
property string defaultBorderColor: "#D7D8DB"
|
||||
property string checkedBorderColor: "#FBB26A"
|
||||
property string checkedBorderDisabledColor: "#5A330C"
|
||||
|
||||
property string checkedImageColor: "#FBB26A"
|
||||
property string pressedImageColor: "#A85809"
|
||||
property string defaultImageColor: "transparent"
|
||||
property string checkedDisabledImageColor: "#84603D"
|
||||
|
||||
property string imageSource: "qrc:/images/controls/check.svg"
|
||||
|
||||
hoverEnabled: true
|
||||
hoverEnabled: enabled ? true : false
|
||||
|
||||
indicator: Rectangle {
|
||||
id: background
|
||||
|
|
@ -52,7 +59,7 @@ CheckBox {
|
|||
width: 24
|
||||
height: 24
|
||||
color: "transparent"
|
||||
border.color: root.checked ? checkedBorderColor : defaultBorderColor
|
||||
border.color: root.checked ? (root.enabled ? checkedBorderColor : checkedBorderDisabledColor) : defaultBorderColor
|
||||
border.width: 1
|
||||
radius: 4
|
||||
|
||||
|
|
@ -63,7 +70,19 @@ CheckBox {
|
|||
layer {
|
||||
enabled: true
|
||||
effect: ColorOverlay {
|
||||
color: root.pressed ? pressedImageColor : root.checked ? checkedImageColor : defaultImageColor
|
||||
color: {
|
||||
if (root.pressed) {
|
||||
return root.pressedImageColor
|
||||
} else if (root.checked) {
|
||||
if (root.enabled) {
|
||||
return root.checkedImageColor
|
||||
} else {
|
||||
return root.checkedDisabledImageColor
|
||||
}
|
||||
} else {
|
||||
return root.defaultImageColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -90,6 +109,7 @@ CheckBox {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: root.text
|
||||
color: root.enabled ? root.textColor : root.textDisabledColor
|
||||
}
|
||||
|
||||
CaptionTextType {
|
||||
|
|
@ -98,7 +118,7 @@ CheckBox {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: root.descriptionText
|
||||
color: "#878b91"
|
||||
color: root.enabled ? root.descriptionTextColor : root.descriptionTextDisabledColor
|
||||
|
||||
visible: root.descriptionText !== ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,14 +9,16 @@ RadioButton {
|
|||
|
||||
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 selectedColor: Qt.rgba(1, 1, 1, 0)
|
||||
property string checkedColor: Qt.rgba(1, 1, 1, 0)
|
||||
property string disabledColor: "transparent"
|
||||
|
||||
property string textColor: "#0E0E11"
|
||||
property string textColor: "#D7D8DB"
|
||||
property string textDisabledColor: "#878B91"
|
||||
|
||||
property string pressedBorderColor: "#494B50"
|
||||
property string selectedBorderColor: "#FBB26A"
|
||||
property string checkedBorderColor: "#FBB26A"
|
||||
property string defaultBodredColor: "transparent"
|
||||
property string checkedDisabledBorderColor: "#84603D"
|
||||
property int borderWidth: 0
|
||||
|
||||
implicitWidth: content.implicitWidth
|
||||
|
|
@ -27,39 +29,39 @@ RadioButton {
|
|||
radius: 16
|
||||
|
||||
color: {
|
||||
// if (root.enabled) {
|
||||
if (root.enabled) {
|
||||
if (root.hovered) {
|
||||
return hoveredColor
|
||||
return root.hoveredColor
|
||||
} else if (root.checked) {
|
||||
return selectedColor
|
||||
return root.checkedColor
|
||||
}
|
||||
return defaultColor
|
||||
// } else {
|
||||
// return disabledColor
|
||||
// }
|
||||
return root.defaultColor
|
||||
} else {
|
||||
return root.disabledColor
|
||||
}
|
||||
}
|
||||
|
||||
border.color: {
|
||||
// if (root.enabled) {
|
||||
if (root.enabled) {
|
||||
if (root.pressed) {
|
||||
return pressedBorderColor
|
||||
return root.pressedBorderColor
|
||||
} else if (root.checked) {
|
||||
return selectedBorderColor
|
||||
return root.checkedBorderColor
|
||||
}
|
||||
return defaultBodredColor
|
||||
// }
|
||||
// return defaultBodredColor
|
||||
return root.defaultBodredColor
|
||||
} else {
|
||||
if (root.checked) {
|
||||
return root.checkedDisabledBorderColor
|
||||
}
|
||||
return root.defaultBodredColor
|
||||
}
|
||||
}
|
||||
|
||||
border.width: {
|
||||
// if (root.enabled) {
|
||||
if(root.checked) {
|
||||
return 1
|
||||
}
|
||||
return root.pressed ? 1 : 0
|
||||
// } else {
|
||||
// return 0
|
||||
// }
|
||||
if(root.checked) {
|
||||
return 1
|
||||
}
|
||||
return root.pressed ? 1 : 0
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
|
|
@ -77,6 +79,7 @@ RadioButton {
|
|||
|
||||
ButtonTextType {
|
||||
text: root.text
|
||||
color: root.enabled ? root.textColor : root.textDisabledColor
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: 16
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import "TextTypes"
|
|||
Popup {
|
||||
id: root
|
||||
|
||||
property string popupErrorMessageText
|
||||
property string text
|
||||
property bool closeButtonVisible: true
|
||||
|
||||
leftMargin: 25
|
||||
|
|
@ -17,46 +17,56 @@ Popup {
|
|||
width: parent.width - leftMargin - rightMargin
|
||||
|
||||
anchors.centerIn: parent
|
||||
modal: true
|
||||
modal: root.closeButtonVisible
|
||||
closePolicy: Popup.CloseOnEscape
|
||||
|
||||
Overlay.modal: Rectangle {
|
||||
visible: root.closeButtonVisible
|
||||
color: Qt.rgba(14/255, 14/255, 17/255, 0.8)
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
|
||||
color: "white"//Qt.rgba(215/255, 216/255, 219/255, 0.95)
|
||||
color: "white"
|
||||
radius: 4
|
||||
}
|
||||
|
||||
contentItem: RowLayout {
|
||||
contentItem: Item {
|
||||
implicitWidth: content.implicitWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
|
||||
CaptionTextType {
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
Layout.fillWidth: true
|
||||
RowLayout {
|
||||
id: content
|
||||
|
||||
text: root.popupErrorMessageText
|
||||
}
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
|
||||
BasicButtonType {
|
||||
visible: closeButtonVisible
|
||||
CaptionTextType {
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
Layout.fillWidth: true
|
||||
|
||||
defaultColor: "white"//"transparent"//Qt.rgba(215/255, 216/255, 219/255, 0.95)
|
||||
hoveredColor: "#C1C2C5"
|
||||
pressedColor: "#AEB0B7"
|
||||
disabledColor: "#494B50"
|
||||
text: root.text
|
||||
}
|
||||
|
||||
textColor: "#0E0E11"
|
||||
borderWidth: 0
|
||||
BasicButtonType {
|
||||
visible: closeButtonVisible
|
||||
|
||||
text: qsTr("Close")
|
||||
onClicked: {
|
||||
root.close()
|
||||
defaultColor: "white"
|
||||
hoveredColor: "#C1C2C5"
|
||||
pressedColor: "#AEB0B7"
|
||||
disabledColor: "#494B50"
|
||||
|
||||
textColor: "#0E0E11"
|
||||
borderWidth: 0
|
||||
|
||||
text: qsTr("Close")
|
||||
onClicked: {
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,14 +8,24 @@ Switch {
|
|||
id: root
|
||||
|
||||
property alias descriptionText: description.text
|
||||
property string descriptionTextColor: "#878B91"
|
||||
property string descriptionTextDisabledColor: "#494B50"
|
||||
|
||||
property string textColor: "#D7D8DB"
|
||||
property string textDisabledColor: "#878B91"
|
||||
|
||||
property string checkedIndicatorColor: "#412102"
|
||||
property string defaultIndicatorColor: "transparent"
|
||||
property string checkedDisabledIndicatorColor: "#5A330C"
|
||||
|
||||
property string checkedIndicatorBorderColor: "#412102"
|
||||
property string defaultIndicatorBorderColor: "#494B50"
|
||||
property string checkedDisabledIndicatorBorderColor: "#5A330C"
|
||||
|
||||
property string checkedInnerCircleColor: "#FBB26A"
|
||||
property string defaultInnerCircleColor: "#D7D8DB"
|
||||
property string checkedDisabledInnerCircleColor: "#84603D"
|
||||
property string defaultDisabledInnerCircleColor: "#494B50"
|
||||
|
||||
property string hoveredIndicatorBackgroundColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
property string defaultIndicatorBackgroundColor: "transparent"
|
||||
|
|
@ -23,6 +33,8 @@ Switch {
|
|||
implicitWidth: content.implicitWidth + switcher.implicitWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
|
||||
hoverEnabled: enabled ? true : false
|
||||
|
||||
indicator: Rectangle {
|
||||
id: switcher
|
||||
|
||||
|
|
@ -33,8 +45,10 @@ Switch {
|
|||
implicitHeight: 32
|
||||
|
||||
radius: 16
|
||||
color: root.checked ? checkedIndicatorColor : defaultIndicatorColor
|
||||
border.color: root.checked ? checkedIndicatorBorderColor : defaultIndicatorBorderColor
|
||||
color: root.checked ? (root.enabled ? root.checkedIndicatorColor : root.checkedDisabledIndicatorColor)
|
||||
: root.defaultIndicatorColor
|
||||
border.color: root.checked ? (root.enabled ? root.checkedIndicatorBorderColor : root.checkedDisabledIndicatorBorderColor)
|
||||
: root.defaultIndicatorBorderColor
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
|
|
@ -51,7 +65,8 @@ Switch {
|
|||
width: root.checked ? 24 : 16
|
||||
height: root.checked ? 24 : 16
|
||||
radius: 23
|
||||
color: root.checked ? checkedInnerCircleColor : defaultInnerCircleColor
|
||||
color: root.checked ? (root.enabled ? root.checkedInnerCircleColor : root.checkedDisabledInnerCircleColor)
|
||||
: (root.enabled ? root.defaultInnerCircleColor : root.defaultDisabledInnerCircleColor)
|
||||
|
||||
Behavior on x {
|
||||
PropertyAnimation { duration: 200 }
|
||||
|
|
@ -63,7 +78,7 @@ Switch {
|
|||
width: 40
|
||||
height: 40
|
||||
radius: 23
|
||||
color: hovered ? hoveredIndicatorBackgroundColor : defaultIndicatorBackgroundColor
|
||||
color: root.hovered ? root.hoveredIndicatorBackgroundColor : root.defaultIndicatorBackgroundColor
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
|
|
@ -81,6 +96,7 @@ Switch {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: root.text
|
||||
color: root.enabled ? root.textColor : root.textDisabledColor
|
||||
}
|
||||
|
||||
CaptionTextType {
|
||||
|
|
@ -88,7 +104,7 @@ Switch {
|
|||
|
||||
Layout.fillWidth: true
|
||||
|
||||
color: "#878B91"
|
||||
color: root.enabled ? root.descriptionTextColor : root.descriptionTextDisabledColor
|
||||
|
||||
visible: text !== ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue