summaryrefslogtreecommitdiff
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
parentdfaa8a945be141c764ebae7f9d0783e16dc0914a (diff)
Small GUI tweaks.
-rw-r--r--client/collapser.cc10
-rw-r--r--client/mainwindow.cc2
2 files changed, 8 insertions, 4 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) {
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);