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

BUG: Specify application-modality when opening dialogs as application-modal. #164

Merged
merged 2 commits into from May 21, 2014

Conversation

rkern
Copy link
Member

@rkern rkern commented May 15, 2014

Modal Traits UIs are always opened as application-modal: the call to exec_() always blocks the entire application. However, we have been incorrectly specifying the window-modal flag instead. To make an actually-window-modal dialog, one needs to work asynchronously by listening to the finished() slot of the QDialog and doing all of the follow-up code there; then one calls open() instead of exec_() to avoid blocking the whole application. We don't do this.

The practical change is one of styling on the Mac platform. Window-modal dialogs appear as drop-down sheets from their parent window, and not independent windows with their own titlebar. These are intended for small dialogs, like "OK/Cancel" dialogs, while most Traits UI Views do not fit this styling very well . Notably, with this change, a Tasks application preferences dialog will no longer appear as a sheet.

@corranwebster
Copy link
Member

This is something that @jasonmccampbell should be aware of, as it will impact the Canopy application, hopefully for the better.

@rkern
Copy link
Member Author

rkern commented May 15, 2014

It does fix the problem we were having with floating dock panes. The free-standing modal dialog is raised above them, unlike the sheet.

@jwiggins
Copy link
Member

👍

1 similar comment
@pankajp
Copy link
Contributor

pankajp commented May 21, 2014

👍

rkern added a commit that referenced this pull request May 21, 2014
BUG: Specify application-modality when opening dialogs as application-modal.
@rkern rkern merged commit 97d7dc6 into master May 21, 2014
@rkern rkern deleted the fix/window-modality branch May 21, 2014 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants