fix: update delete modal
this fixes the text color in dark mode and the StyledButton is replaced with a StatusButton For the StatusButton to support the color red, I added the color property that can be overridden
This commit is contained in:
parent
2b7e66d4e5
commit
80cd040bcd
|
@ -2,6 +2,7 @@ import QtQuick 2.13
|
||||||
import QtQuick.Controls 2.13
|
import QtQuick.Controls 2.13
|
||||||
import QtQuick.Layouts 1.13
|
import QtQuick.Layouts 1.13
|
||||||
import "../imports"
|
import "../imports"
|
||||||
|
import "../shared/status"
|
||||||
import "./"
|
import "./"
|
||||||
|
|
||||||
ModalPopup {
|
ModalPopup {
|
||||||
|
@ -26,6 +27,7 @@ ModalPopup {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: confirmationDialog.confirmationText
|
text: confirmationDialog.confirmationText
|
||||||
|
color: Style.current.textColor
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -37,14 +39,11 @@ ModalPopup {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: children[0].height
|
height: children[0].height
|
||||||
|
|
||||||
StyledButton {
|
StatusButton {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: Style.current.smallPadding
|
anchors.rightMargin: Style.current.smallPadding
|
||||||
btnColor: Style.current.lightRed
|
color: Style.current.red
|
||||||
btnBorderWidth: 1
|
text: confirmationDialog.confirmButtonLabel
|
||||||
btnBorderColor: Style.current.grey
|
|
||||||
textColor: Style.current.red
|
|
||||||
label: confirmationDialog.confirmButtonLabel
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
onClicked: confirmationDialog.confirmButtonClicked()
|
onClicked: confirmationDialog.confirmButtonClicked()
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ Button {
|
||||||
property string type: "primary"
|
property string type: "primary"
|
||||||
property string size: "large"
|
property string size: "large"
|
||||||
property string state: "default"
|
property string state: "default"
|
||||||
|
property string color: Style.current.buttonForegroundColor
|
||||||
|
|
||||||
id: control
|
id: control
|
||||||
font.pixelSize: size === "small" ? 13 : 15
|
font.pixelSize: size === "small" ? 13 : 15
|
||||||
|
@ -25,7 +26,7 @@ Button {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: !enabled ? Style.current.buttonDisabledForegroundColor : Style.current.buttonForegroundColor
|
color: !enabled ? Style.current.buttonDisabledForegroundColor : control.color
|
||||||
visible: !loadingIndicator.active
|
visible: !loadingIndicator.active
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue