Receive: remove highlight of QR code menu if no menu item is hovered

This commit is contained in:
rating89us 2021-09-02 20:49:54 +02:00 committed by GitHub
parent 113efbfdf0
commit d3d78416d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,13 +152,16 @@ Rectangle {
Menu { Menu {
id: qrMenu id: qrMenu
title: "QrCode" title: "QrCode"
currentIndex: menuItem1.hovered ? 0 : menuItem2.hovered ? 1 : -1
MenuItem { MenuItem {
id: menuItem1
text: qsTr("Copy to clipboard") + translationManager.emptyString; text: qsTr("Copy to clipboard") + translationManager.emptyString;
onTriggered: walletManager.saveQrCodeToClipboard(generateQRCodeString()) onTriggered: walletManager.saveQrCodeToClipboard(generateQRCodeString())
} }
MenuItem { MenuItem {
id: menuItem2
text: qsTr("Save as Image") + translationManager.emptyString; text: qsTr("Save as Image") + translationManager.emptyString;
onTriggered: qrFileDialog.open() onTriggered: qrFileDialog.open()
} }