aboutsummaryrefslogtreecommitdiff
path: root/components/ContextMenuItem.qml
diff options
context:
space:
mode:
authorrating89us <45968869+rating89us@users.noreply.github.com>2021-09-05 15:36:38 +0200
committerrating89us <45968869+rating89us@users.noreply.github.com>2021-09-05 15:52:51 +0200
commitd3780abe33f8e78125eda7546fa2e14a4cfc4fab (patch)
tree3c09afb67eed4f0be74c0abfa18b16d626f04418 /components/ContextMenuItem.qml
parent113efbfdf093401d3044ce370b7039ea8cc596bf (diff)
downloadmonzero-gui-d3780abe33f8e78125eda7546fa2e14a4cfc4fab.tar.gz
monzero-gui-d3780abe33f8e78125eda7546fa2e14a4cfc4fab.tar.xz
monzero-gui-d3780abe33f8e78125eda7546fa2e14a4cfc4fab.zip
ContextMenu: add Cut, Copy, Delete and Select All
Diffstat (limited to 'components/ContextMenuItem.qml')
-rw-r--r--components/ContextMenuItem.qml20
1 files changed, 15 insertions, 5 deletions
diff --git a/components/ContextMenuItem.qml b/components/ContextMenuItem.qml
index de2d54ad..c4e0f395 100644
--- a/components/ContextMenuItem.qml
+++ b/components/ContextMenuItem.qml
@@ -13,21 +13,31 @@ MenuItem {
background: Rectangle {
color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
- opacity: mouse.containsMouse ? 1 : 0
+ opacity: 0
MouseArea {
id: mouse
anchors.fill: parent
hoverEnabled: true
- onClicked: menuItem.triggered()
- visible: menuItem.enabled
+ onEntered: {
+ parent.opacity = 1;
+ }
+ onExited: {
+ parent.opacity = 0;
+ }
+ onClicked: {
+ if (menuItem.enabled) {
+ menuItem.triggered();
+ parent.opacity = 0;
+ }
+ }
}
}
contentItem: RowLayout {
anchors.fill: parent
- anchors.leftMargin: 10
+ anchors.leftMargin: 20
anchors.rightMargin: 10
opacity: menuItem.enabled ? 1 : 0.4
spacing: 8
@@ -42,7 +52,7 @@ MenuItem {
}
Text {
- color: MoneroComponents.Style.buttonTextColor
+ color: MoneroComponents.Style.blackTheme ? MoneroComponents.Style.buttonTextColor : MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
Layout.fillWidth: true