Save/restore maximised state when collpasing/expanding interface.

This commit is contained in:
craig
2012-02-10 20:32:29 +00:00
committed by craig
parent f828fb4901
commit 454f553e09
2 changed files with 9 additions and 1 deletions

View File

@@ -33,6 +33,8 @@
25. Query MPD for list of supported protocols - and only allow supported URLs.
26. Remove 'Copy Track Info' from play queue context menu - functionality is
available via Ctrl-C
27. Fix streams export.
28. Save/restore maximised state when collpasing/expanding interface.
0.3.0
-----

View File

@@ -1776,10 +1776,12 @@ void MainWindow::togglePlaylist()
return;
}
static QSize lastSize;
static bool lastMax=false;
bool showing=expandInterfaceAction->isChecked();
if (!showing) {
lastMax=isMaximized();
lastSize=size();
} else {
setMinimumHeight(0);
@@ -1798,7 +1800,11 @@ void MainWindow::togglePlaylist()
resize(adjustWidth ? lastSize.width() : size().width(), adjustHeight ? lastSize.height() : size().height());
}
if (!showing) {
if (showing) {
if (lastMax) {
showMaximized();
}
} else {
setMinimumHeight(size().height());
setMaximumHeight(size().height());
}