forked from LMMS/lmms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the maximization of sub windows (LMMS#7530)
## Fix rendering of maximized sub windows ### Adjustments in paintEvent In `SubWindow::paintEvent` don't paint anything if the sub window is maximized . Otherwise some gradients are visible behind the maximized child content. ### Adjustments in adjustTitleBar In `SubWindow::adjustTitleBar` hide the title label and the buttons if the sub window is maximized. Always show the title and close button if not maximized. This is needed to reset the state correctly after maximization. Remove some calls to `isMaximized` where we already know that the sub window is not maximized, i.e. where these calls would always return `false`. One adjustment would have resulted in a call to `setHidden(false)`. This was changed to `setVisible(true)` to get rid of the double negation. The other `false` would have gotten in an or statement and thus could be removed completely. ### Add method addTitleButton Add the helper method `SubWindow::addTitleButton` to reduce code repetition in the constructor. ### Other changes Remove a dependency on the `MdiArea` when checking if the sub window is the active one. Query its own window state to find out if it is active. When calling `setWindowFlags` in the constructor only adjust the existing flags with the changes that we actually want to do. It was ensured that all other flags that have been set before still apply with this change.
- Loading branch information
1 parent
ddf89b5
commit 073f14d
Showing
2 changed files
with
47 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters