mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-17 00:06:05 +03:00
fix: app buttons clicked instead of buttons in context menu (#2200)
* fix: app buttons clicked instead of buttons in context menu * update: using MouseArea instead of changing popupType * fix(cursor): fixed cursor type at opened context menu --------- Co-authored-by: Mitternacht822 <sb@amnezia.org>
This commit is contained in:
@@ -6,6 +6,9 @@ Menu {
|
||||
|
||||
popupType: Popup.Native
|
||||
|
||||
onAboutToShow: blocker.enabled = true
|
||||
onClosed: blocker.enabled = false
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("C&ut")
|
||||
enabled: textObj.selectedText
|
||||
@@ -28,4 +31,11 @@ Menu {
|
||||
enabled: textObj.length > 0
|
||||
onTriggered: textObj.selectAll()
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: blocker
|
||||
z: 2
|
||||
enabled: false
|
||||
preventStealing: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ Rectangle {
|
||||
MouseArea {
|
||||
id: parentMouse
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.IBeamCursor
|
||||
cursorShape: contextMenu.opened ? Qt.ArrowCursor : Qt.IBeamCursor
|
||||
onClicked: textArea.forceActiveFocus()
|
||||
hoverEnabled: true
|
||||
|
||||
@@ -94,6 +94,7 @@ Rectangle {
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
ContextMenu.menu: ContextMenuType {
|
||||
id: contextMenu
|
||||
textObj: textArea
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ Rectangle {
|
||||
MouseArea {
|
||||
id: parentMouse
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.IBeamCursor
|
||||
cursorShape: contextMenu.opened ? Qt.ArrowCursor : Qt.IBeamCursor
|
||||
onClicked: textArea.forceActiveFocus()
|
||||
hoverEnabled: true
|
||||
|
||||
@@ -80,6 +80,7 @@ Rectangle {
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
ContextMenu.menu: ContextMenuType {
|
||||
id: contextMenu
|
||||
textObj: textArea
|
||||
}
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ Item {
|
||||
}
|
||||
|
||||
ContextMenu.menu: ContextMenuType {
|
||||
id: contextMenu
|
||||
textObj: textField
|
||||
}
|
||||
|
||||
@@ -159,7 +160,7 @@ Item {
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: root
|
||||
cursorShape: Qt.IBeamCursor
|
||||
cursorShape: contextMenu.opened ? Qt.ArrowCursor : Qt.IBeamCursor
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user