summaryrefslogtreecommitdiff
path: root/client/collapser.cc
diff options
context:
space:
mode:
authordeva <deva>2008-10-13 09:24:09 +0000
committerdeva <deva>2008-10-13 09:24:09 +0000
commit657b90b2edfe8759cb649d3c61696e2a46d3258f (patch)
tree1635bfe9693a63a2cbb757c4e810240b5deac19c /client/collapser.cc
parentdfaa8a945be141c764ebae7f9d0783e16dc0914a (diff)
Small GUI tweaks.
Diffstat (limited to 'client/collapser.cc')
-rw-r--r--client/collapser.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/collapser.cc b/client/collapser.cc
index bb14722..e06a5cf 100644
--- a/client/collapser.cc
+++ b/client/collapser.cc
@@ -25,7 +25,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "collapser.h"
-
+#include <QApplication>
#include <QHBoxLayout>
#define ANIM_TIME 100
@@ -59,6 +59,11 @@ void Collapser::setCollapsedWidget(QWidget *collapsed)
}
this->collapsed = collapsed;
+
+ if(isCollapsed() == true && collapsed) {
+ layout()->addWidget(collapsed);
+ collapsed->setVisible(true);
+ }
}
void Collapser::setExpandedWidget(QWidget *expanded)
@@ -116,6 +121,7 @@ void Collapser::expand()
// show expanded
if(collapsed) {
collapsed->setVisible(false);
+ qApp->processEvents(); // Make sure it is actualle invisble before removing it form the layout.
layout()->removeWidget(collapsed);
}
if(expanded) {
@@ -164,7 +170,6 @@ void Collapser::anim()
}
setFixedHeight(height);
- killTimer(timer_id);
timer_id = startTimer(ANIM_INTERVAL);
} else {
@@ -172,6 +177,7 @@ void Collapser::anim()
// show collapsed
if(expanded) {
expanded->setVisible(false);
+ qApp->processEvents(); // Make sure it is actualle invisble before removing it form the layout.
layout()->removeWidget(expanded);
}
if(collapsed) {