diff options
author | deva <deva> | 2008-10-10 12:35:56 +0000 |
---|---|---|
committer | deva <deva> | 2008-10-10 12:35:56 +0000 |
commit | dfaa8a945be141c764ebae7f9d0783e16dc0914a (patch) | |
tree | 3e2aa2a30ca9a10082eb5a52bb23f6fde2eefcdb | |
parent | a703bf6f8dd6cd5a75202266f769e3ef2e42bcb2 (diff) |
Made various fixes and UI improvements to collapser and macro/resumewidgets.
-rw-r--r-- | client/collapser.cc | 7 | ||||
-rw-r--r-- | client/mainwindow.cc | 24 | ||||
-rw-r--r-- | client/resumewidget.cc | 7 |
3 files changed, 25 insertions, 13 deletions
diff --git a/client/collapser.cc b/client/collapser.cc index fcf4a1d..bb14722 100644 --- a/client/collapser.cc +++ b/client/collapser.cc @@ -105,6 +105,7 @@ void Collapser::collapse() t_anim.start(); is_collapsed = true; + killTimer(timer_id); timer_id = startTimer(ANIM_INTERVAL); } @@ -123,6 +124,7 @@ void Collapser::expand() } is_collapsed = false; + killTimer(timer_id); timer_id = startTimer(ANIM_INTERVAL); } @@ -139,18 +141,16 @@ void Collapser::anim() if(collapsed) { QSize sz = collapsed->minimumSizeHint(); c_height = sz.height(); - //c_height = collapsed->minimumHeight(); } if(expanded) { QSize sz = expanded->minimumSizeHint(); e_height = sz.height(); - //e_height = expanded->minimumHeight(); } killTimer(timer_id); - double x = (double)(t_anim.elapsed()) / ANIM_TIME; + double x = (double)(t_anim.elapsed()) / (double)ANIM_TIME; double y = 1; if(x < 1) { @@ -164,6 +164,7 @@ void Collapser::anim() } setFixedHeight(height); + killTimer(timer_id); timer_id = startTimer(ANIM_INTERVAL); } else { diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 619a24e..2b4780a 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -84,16 +84,26 @@ void MainWindow::update() if(xml_elem.attribute("static", "false") == "true") isstatic = true; macros[macroname] = new MacroWindow(&netcom, macronode, course, !isstatic); - QGroupBox *g = new QGroupBox(" " + xml_elem.attribute("caption", macroname)); - g->setCheckable(false); - g->setChecked(false); + QGroupBox *g = new QGroupBox(); + g->setTitle(" " + xml_elem.attribute("caption", macroname)); + g->setFlat(true); + { + QFont f = g->font(); + f.setBold(true); + g->setFont(f); + } ((QBoxLayout*)w->layout())->addWidget(g); if(!isstatic) { - QPushButton *b = new QPushButton("+", g); + QPushButton *b = new QPushButton("±", g); b->setFixedSize(16,16); b->show(); b->move(0,0); + { + QFont f = b->font(); + f.setBold(false); + b->setFont(f); + } connect(b, SIGNAL(clicked()), macros[macroname], SLOT(toggleMacro())); } @@ -104,7 +114,11 @@ void MainWindow::update() l->addWidget(macros[macroname]); connect(macros[macroname], SIGNAL(updateOnCommit()), this, SLOT(update())); macros[macroname]->show(); - + { + QFont f = macros[macroname]->font(); + f.setBold(false); + macros[macroname]->setFont(f); + } } else { macros[macroname]->update(macronode); diff --git a/client/resumewidget.cc b/client/resumewidget.cc index b991ccf..d5b1825 100644 --- a/client/resumewidget.cc +++ b/client/resumewidget.cc @@ -30,7 +30,6 @@ #include <QBoxLayout> //#define RICH - ResumeWidget::ResumeWidget() { setLayout(new QHBoxLayout()); @@ -43,10 +42,7 @@ ResumeWidget::ResumeWidget() resume->setWordWrap(true); resume->setEnabled(false); - /* - resume->setFixedWidth(300); - ((QBoxLayout*)layout())->addStretch(); - */ + layout()->addWidget(resume); } @@ -70,3 +66,4 @@ void ResumeWidget::setText(QString text) resume->setText(text); #endif } + |