Use modules.
This commit is contained in:
13
imports/Spectral/Component/AutoMouseArea.qml
Normal file
13
imports/Spectral/Component/AutoMouseArea.qml
Normal file
@@ -0,0 +1,13 @@
|
||||
import QtQuick 2.9
|
||||
|
||||
import Spectral.Setting 0.1
|
||||
|
||||
MouseArea {
|
||||
signal primaryClicked()
|
||||
signal secondaryClicked()
|
||||
|
||||
acceptedButtons: MSettings.pressAndHold ? Qt.LeftButton : (Qt.LeftButton | Qt.RightButton)
|
||||
|
||||
onClicked: mouse.button == Qt.RightButton ? secondaryClicked() : primaryClicked()
|
||||
onPressAndHold: MSettings.pressAndHold ? secondaryClicked() : {}
|
||||
}
|
||||
Reference in New Issue
Block a user