-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Remove dockwidget title bars by default and improve dock/undock behavior #8192
Conversation
This allows us to have very nice features for DockWidgets introduced in that version
This was implemented in Qt 5.6
Hello @ccordoba12! Thanks for updating the PR.
Comment last updated on December 24, 2018 at 04:05 Hours UTC |
@jnsebgosselin, I'm taking over these tasks from you, hope that's fine :-) With the new dark theme, I really think we need this. |
Sure go ahead! I have another suggestion that could be considered for this PR. Maybe when we check the Here is an example of what I mean in LibreOffice: |
Also show a new dock action when the window is undocked
…cked through the dock action
db313ac
to
7024e92
Compare
@ccordoba12 FYI, in my testing when panels are undocked as this PR implements, they do not close when Spyder does and hang around indefinitely (this is also true of e.g. the prefs window outside of this PR). There appears to be two methods (as I discuss in #8474 ) to address this. I assume that's in scope here. |
…rent theme Also close them when a client is closed.
I think this is finally ready!! My comments:
I couldn't reproduce this one, sorry.
I removed the undock button and leave only the undock action to avoid confusion. I also made undocked windows to be closed when Spyder is closed.
I reverted to have tabs on top to avoid this.
This no longer applies because I removed the undock button. Besides, I added a custom title bar to all plugins that is shown when "Lock panes" is unchecked and that only let's you drag and drop panes to a different location.
I decided to leave the current behavior because this PR was getting too big (it could be implemented in another PR, but I think it's low priority). @CAM-Gerlach, do you have something to add? |
@ccordoba12 Sounds good, thanks for all your hard work and for addressing my comments! I'll take one last look at it and let you know momentarily if I find anything egregious. This indeed has gotten pretty big so I don't want to get off topic and make it any bigger, just if I see a significant issue with the current functionality here. |
Ok, thanks! If you have more suggestions on how to improve this functionality, please open a new issue about it. But for now, please focus on reviewing the things implemented here. |
@ccordoba12 I like the new UX and everything works and looks pretty good; and it seems the project explorer close button not working issue was fixed somewhere down the line. However, I did see some significant issue: On opening Spyder with panes locked (The default), the toolbar of the project explorer: and the file explorer: look all messed up, with the close button embedded in them. Resizing the window doesn't fix it; the only thing that does is toggling "unlock panes" then "lock panes" again and it thereafter looks normal. I assume some part of your changes is/isn't getting fired on startup but isn't/is triggering on toggling that option. Correct look: This is under Qt 5.9.6. PyQt 5.9.2, Windows 8.1 and Python 3.6.7 |
Also set our custom title bar for docks in their constructor
…'s toggle_view_action
Thanks for noticing it. This was due to a bug in the initialization of our custom title bar for dock widgets and it should be fixed with my latest commits. |
Please check if that's the case to merge this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, your changes fixed the initialization issue. Thanks!
I finally added a couple of tests to verify that the basic functionality is working as expected. Thanks @CAM-Gerlach for your help with this one! |
The purpose of this PR is to implement the following:
qdarkstyle
programmatically, we have to hardcode them and we prefer the Python 3 theme instead of Python 2 one.Resources:
Screenshots
Custom dockwidget title bar / New Options menu icon (the same one used in web browsers)
New Options menu actions (the last there in this screenshot): All plugins have now an Undock and a Close action.
Lock panes action locks toolbars now too
Fixes #8171.
Fixes #8011.
Fixes #5515.
Fixes #2855.
Fixes #2854.