diagrams: use Ctrl+drag to pan (Meta is global on KDE)
This commit is contained in:
parent
931cadb3ce
commit
395f2890ae
|
|
@ -1469,7 +1469,7 @@ Item {
|
||||||
contentWidth: diagramZoomImg.width
|
contentWidth: diagramZoomImg.width
|
||||||
contentHeight: diagramZoomImg.height
|
contentHeight: diagramZoomImg.height
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
interactive: false // disable default drag — we handle it via Meta+drag
|
interactive: false // disable default drag — we handle it via Ctrl+drag
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: diagramZoomImg
|
id: diagramZoomImg
|
||||||
|
|
@ -1493,7 +1493,7 @@ Item {
|
||||||
property bool panning: false
|
property bool panning: false
|
||||||
|
|
||||||
onPressed: function(mouse) {
|
onPressed: function(mouse) {
|
||||||
if (mouse.button === Qt.LeftButton && (mouse.modifiers & Qt.MetaModifier)) {
|
if (mouse.button === Qt.LeftButton && (mouse.modifiers & Qt.ControlModifier)) {
|
||||||
panning = true
|
panning = true
|
||||||
startX = mouse.x
|
startX = mouse.x
|
||||||
startY = mouse.y
|
startY = mouse.y
|
||||||
|
|
|
||||||
|
|
@ -2279,7 +2279,7 @@ ApplicationWindow {
|
||||||
contentWidth: diagramZoomImg.width
|
contentWidth: diagramZoomImg.width
|
||||||
contentHeight: diagramZoomImg.height
|
contentHeight: diagramZoomImg.height
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
interactive: false // disable default drag — we handle it via Meta+drag
|
interactive: false // disable default drag — we handle it via Ctrl+drag
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: diagramZoomImg
|
id: diagramZoomImg
|
||||||
|
|
@ -2302,7 +2302,7 @@ ApplicationWindow {
|
||||||
property bool panning: false
|
property bool panning: false
|
||||||
|
|
||||||
onPressed: function(mouse) {
|
onPressed: function(mouse) {
|
||||||
if (mouse.button === Qt.LeftButton && (mouse.modifiers & Qt.MetaModifier)) {
|
if (mouse.button === Qt.LeftButton && (mouse.modifiers & Qt.ControlModifier)) {
|
||||||
panning = true
|
panning = true
|
||||||
startX = mouse.x
|
startX = mouse.x
|
||||||
startY = mouse.y
|
startY = mouse.y
|
||||||
|
|
|
||||||
Reference in New Issue