Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be able to drag Dock to tear out of window #15

Open
campagnola opened this issue Nov 22, 2013 · 1 comment
Open

Should be able to drag Dock to tear out of window #15

campagnola opened this issue Nov 22, 2013 · 1 comment
Labels
bug Dock Issues/PRs related to the dock

Comments

@campagnola
Copy link
Member

Currently, docks must be double-clicked to tear out to their own window, then dragged to rejoin with the original window. This is not intuitive; we should be able to drag in both directions.

@2xB
Copy link
Contributor

2xB commented Jun 11, 2020

There is a "simple fix", with the consequence that the drag event can no longer be cancelled. It works like this:
DockDrop.dropEvent has to accept the event by ev.accept(). This allows the following modification of Dock.startDrag:

        action = self.drag.exec_()
        # Check if dropped outside or cancelled
        if action == 0:
            self.float()

(after ev.accept(), action is 2)

This solution can be easily put in a PR, if it is okay to loose the ability to cancel the drag event in favour of the possibility to drag a dock outside. So - is it?

@2xB 2xB added the Dock Issues/PRs related to the dock label Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Dock Issues/PRs related to the dock
Projects
None yet
Development

No branches or pull requests

2 participants