Skip to content
  • rk flx's avatar
    Show more appropriate cursor when dragging and enable modifier keys · 1bd31c9e
    rk flx authored
    Summary:
    984b9737 enabled dragging from {nav View} mode, but the cursor
    stayed the same as when panning. This is because by default
    `QGraphicsView` sets the cursor for moving objects, i.e.
    `ClosedHandCursor`. By setting a default action for `QDrag::exec`, we
    get the `DragCopyCursor` which better indicates that the image can be
    dropped, and which is also used when dragging from the `ThumbnailView`.
    
    When drag-and-dropping within Dolphin, you can press {key Shift},
    {key Ctrl} or {key Ctrl Shift} to directly move, copy or link a file
    instead of showing the popup menu asking for the desired action. By
    setting all three actions for the drag object, we can enabled this
    behaviour for dragging from Gwenview to Dolphin too, instead of always
    defaulting to copying.
    
    Test Plan:
    Press {key Shift Ctrl} while dragging an image from either {nav View} or
    {nav Browse} mode to Dolphin. A cursor indicating the linking action
    should be shown instead of the panning cursor.
    
    Reviewers: #gwenview, huoni
    
    Reviewed By: #gwenview, huoni
    
    Subscribers: huoni
    
    Differential Revision: https://phabricator.kde.org/D13725
    1bd31c9e