parent
3f012dbf00
commit
086c868bdc
|
@ -192,6 +192,7 @@ Rectangle {
|
|||
|
||||
ConfirmationDialog {
|
||||
id: deleteChatConfirmationDialog
|
||||
btnType: "warn"
|
||||
onConfirmButtonClicked: {
|
||||
chatsModel.leaveActiveChat()
|
||||
deleteChatConfirmationDialog.close()
|
||||
|
|
|
@ -60,6 +60,7 @@ ListView {
|
|||
// TODO: Make ConfirmationDialog a dynamic component on a future refactor
|
||||
ConfirmationDialog {
|
||||
id: removeContactConfirmationDialog
|
||||
btnType: "warn"
|
||||
title: qsTrId("remove-contact")
|
||||
//% "Are you sure you want to remove this contact?"
|
||||
confirmationText: qsTrId("are-you-sure-you-want-to-remove-this-contact-")
|
||||
|
|
|
@ -57,6 +57,7 @@ Theme {
|
|||
property color buttonSecondaryColor: darkGrey
|
||||
property color buttonDisabledForegroundColor: buttonSecondaryColor
|
||||
property color buttonDisabledBackgroundColor: evenDarkerGrey
|
||||
property color buttonWarnBackgroundColor: "#FFEAEE"
|
||||
|
||||
property color roundedButtonForegroundColor: white
|
||||
property color roundedButtonBackgroundColor: secondaryBackground
|
||||
|
|
|
@ -56,6 +56,7 @@ Theme {
|
|||
property color buttonSecondaryColor: darkGrey
|
||||
property color buttonDisabledForegroundColor: buttonSecondaryColor
|
||||
property color buttonDisabledBackgroundColor: grey
|
||||
property color buttonWarnBackgroundColor: "#FFEAEE"
|
||||
|
||||
property color roundedButtonForegroundColor: buttonForegroundColor
|
||||
property color roundedButtonBackgroundColor: secondaryBackground
|
||||
|
|
|
@ -44,6 +44,7 @@ QtObject {
|
|||
property color buttonSecondaryColor
|
||||
property color buttonDisabledForegroundColor
|
||||
property color buttonDisabledBackgroundColor
|
||||
property color buttonWarnBackgroundColor
|
||||
property color roundedButtonForegroundColor
|
||||
property color roundedButtonBackgroundColor
|
||||
property color roundedButtonSecondaryBackgroundColor
|
||||
|
|
|
@ -9,6 +9,7 @@ ModalPopup {
|
|||
id: confirmationDialog
|
||||
|
||||
property Popup parentPopup
|
||||
property string btnType: "primary"
|
||||
|
||||
|
||||
height: 186
|
||||
|
@ -39,6 +40,7 @@ ModalPopup {
|
|||
height: children[0].height
|
||||
|
||||
StatusButton {
|
||||
type: confirmationDialog.btnType
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.smallPadding
|
||||
color: Style.current.danger
|
||||
|
|
|
@ -9,7 +9,7 @@ Button {
|
|||
property string type: "primary"
|
||||
property string size: "large"
|
||||
property string state: "default"
|
||||
property color color: Style.current.buttonForegroundColor
|
||||
property color color: type === "warn" ? Style.current.danger : Style.current.buttonForegroundColor
|
||||
property color bgColor: Style.current.buttonBackgroundColor
|
||||
property color borderColor: color
|
||||
property color bgHoverColor: Qt.darker(control.bgColor, 1.1)
|
||||
|
@ -69,7 +69,7 @@ Button {
|
|||
anchors.left: iconLoader.active ? iconLoader.right : parent.left
|
||||
anchors.leftMargin: iconLoader.active ? Style.current.smallPadding : 0
|
||||
color: !enabled ? Style.current.buttonDisabledForegroundColor :
|
||||
(hovered || highlighted) ? Style.current.blue : control.color
|
||||
(type !== "warn" && (hovered || highlighted)) ? Style.current.blue : control.color
|
||||
visible: !loadingIndicator.active
|
||||
}
|
||||
|
||||
|
@ -106,8 +106,11 @@ Button {
|
|||
return hovered ? control.bgColor : "transparent"
|
||||
}
|
||||
return !enabled ? Style.current.buttonDisabledBackgroundColor :
|
||||
hovered ? control.bgHoverColor :
|
||||
control.bgColor
|
||||
hovered ?
|
||||
type === "warn" ? Qt.darker(Style.current.buttonWarnBackgroundColor, 1.1) :
|
||||
control.bgHoverColor :
|
||||
type === "warn" ? Style.current.buttonWarnBackgroundColor :
|
||||
control.bgColor
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -654,7 +654,6 @@ Rectangle {
|
|||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
selectionColor: Style.current.primarySelectionColor
|
||||
}
|
||||
Action {
|
||||
shortcut: StandardKey.Bold
|
||||
|
|
Loading…
Reference in New Issue