Skip to content

Tab double click and renaming #673

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

Closed
pylessard opened this issue Nov 7, 2024 · 6 comments
Closed

Tab double click and renaming #673

pylessard opened this issue Nov 7, 2024 · 6 comments

Comments

@pylessard
Copy link

Hi,
For my use case, I would like to have 2 behaviours:

  1. Do not make a dockwidget floating when double-clicking the tab
  2. Allow renaming a tab

For 1. I think a simple flag to disable the event would be enough
For 2, I see 2 options:
a. Fully implemented within this project
b. Add a hook to enable custom QActions inside the context menu of a right click. Then I could add a Rename option that pops a window.

I can make a Pull Request fort 1. and 2.b. Would you be open for it?

@githubuser0xFFFF
Copy link
Owner

Hi, I just added a new config flag to master to enable / disable undocking on double-click. So if you want to implement point 2, feel free to create a pull request.

@pylessard
Copy link
Author

Thanks, will see what I can do.
Do you have a preference on the approach? Native renaming or extensible menu and let the user handle?

@githubuser0xFFFF
Copy link
Owner

Extensible menu would be nice and a more generic solution for more users so I would prefer this.

@studiofuga
Copy link

@pylessard have a look to the latest changes involving the popup menu, specifically commit f237863 and the MyDockAreaTitleBar class in the demo subdirectory. IIUC, that should help you with the implementation.

@pylessard
Copy link
Author

pylessard commented Dec 20, 2024

Thanks, will have a look. I am focusing on something else right now. But when the time comes, I will consider this

@pylessard
Copy link
Author

Altough this issue is closed, I have opened a PR to enable custom contextmenu extension. See #742

Adding custom action could have been possible with a custom component factory, the solution i'm proposing allow per-dock widget features and also is more future-proof for the users as the context menu coming from the library can be extended instead of rebuilt from scratch with a duplicated logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants