fix(delete): fix delete button color and typo in warning

This commit is contained in:
Jonathan Rainville 2021-07-16 11:06:52 -04:00 committed by Iuri Matias
parent 523e94ae0c
commit 93f602adf2
2 changed files with 8 additions and 2 deletions

View File

@ -278,6 +278,11 @@ PopupMenu {
enabled: !isSticker && !emojiOnly
}
Separator {
visible: deleteMessageAction.enabled
height: visible ? Style.current.halfPadding : 0
}
Action {
text: qsTr("Jump to")
onTriggered: {
@ -301,7 +306,7 @@ PopupMenu {
let confirmationDialog = openPopup(genericConfirmationDialog, {
title: qsTr("Confirm deleting this message"),
confirmationText: qsTr("Are you sure you want to delete this message? Be aware that other clients are not garanteed to delete the message as well."),
confirmationText: qsTr("Are you sure you want to delete this message? Be aware that other clients are not guaranteed to delete the message as well."),
height: 260,
"checkbox.visible": true,
executeConfirm: function () {
@ -315,6 +320,7 @@ PopupMenu {
})
}
icon.source: "../../../img/delete.svg"
icon.color: Style.current.danger
icon.width: 16
icon.height: 16
enabled: isCurrentUser

View File

@ -16,7 +16,7 @@ Menu {
delegate: MenuItem {
property color textColor: this.action.icon.color.toString() !== "#00000000" ? this.action.icon.color : Style.current.textColor
property color hoverColor: this.action.type === "danger" ? Style.current.buttonWarnBackgroundColor : Style.current.backgroundHover
property color hoverColor: popupMenuItem.action.icon.color === Style.current.danger ? Style.current.buttonWarnBackgroundColor : Style.current.backgroundHover
property int subMenuIndex: {
if (!this.subMenu) {
return -1