summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/collapser.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/client/collapser.cc b/client/collapser.cc
index 470db7a..fcf4a1d 100644
--- a/client/collapser.cc
+++ b/client/collapser.cc
@@ -28,8 +28,8 @@
#include <QHBoxLayout>
-#define ANIM_TIME 250
-#define ANIM_INTERVAL 25
+#define ANIM_TIME 100
+#define ANIM_INTERVAL 20
Collapser::Collapser(QWidget *collapsed, QWidget *expanded, bool setcollapsed)
{
@@ -54,7 +54,7 @@ void Collapser::setWidgets(QWidget *collapsed, QWidget *expanded)
void Collapser::setCollapsedWidget(QWidget *collapsed)
{
if(this->collapsed) {
- // delete this->collapsed;
+ delete this->collapsed;
this->collapsed = NULL;
}
@@ -64,11 +64,16 @@ void Collapser::setCollapsedWidget(QWidget *collapsed)
void Collapser::setExpandedWidget(QWidget *expanded)
{
if(this->expanded) {
- // delete this->expanded;
+ delete this->expanded;
this->expanded = NULL;
}
this->expanded = expanded;
+
+ if(isCollapsed() == false && expanded) {
+ layout()->addWidget(expanded);
+ expanded->setVisible(true);
+ }
}
QWidget *Collapser::collapsedWidget()