From 454f553e09b2c970fe5b0dce062e55deffbc161c Mon Sep 17 00:00:00 2001 From: craig Date: Fri, 10 Feb 2012 20:32:29 +0000 Subject: [PATCH] Save/restore maximised state when collpasing/expanding interface. --- ChangeLog | 2 ++ gui/mainwindow.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 513686e7c..1edce5b04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 ----- diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 21b0dc1ab..f073238db 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -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()); }