From 657b90b2edfe8759cb649d3c61696e2a46d3258f Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 13 Oct 2008 09:24:09 +0000 Subject: Small GUI tweaks. --- client/collapser.cc | 10 ++++++++-- client/mainwindow.cc | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'client') 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 #include #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) { diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 2b4780a..bcb1b4e 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -97,7 +97,6 @@ void MainWindow::update() if(!isstatic) { QPushButton *b = new QPushButton("±", g); b->setFixedSize(16,16); - b->show(); b->move(0,0); { QFont f = b->font(); @@ -113,7 +112,6 @@ void MainWindow::update() g->setLayout(l); l->addWidget(macros[macroname]); connect(macros[macroname], SIGNAL(updateOnCommit()), this, SLOT(update())); - macros[macroname]->show(); { QFont f = macros[macroname]->font(); f.setBold(false); -- cgit v1.2.3