]> git.sesse.net Git - kdenlive/commitdiff
hide progress bar when not in use
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 25 Feb 2008 22:32:18 +0000 (22:32 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 25 Feb 2008 22:32:18 +0000 (22:32 +0000)
svn path=/branches/KDE4/; revision=1940

src/mainwindow.cpp

index 7b385d3ae7a07d4ba5c056bc1566d00da3866213..167e6e29702079c10ac0c76f5f6e0c11031e11bf 100644 (file)
@@ -141,6 +141,8 @@ MainWindow::MainWindow(QWidget *parent)
   statusProgressBar=new QProgressBar(this);
   statusProgressBar->setMinimum(0);
   statusProgressBar->setMaximum(100);
+  statusProgressBar->setMaximumWidth(150);
+  statusProgressBar->setVisible(false);
   statusLabel=new QLabel(this);        
 
   statusBar()->insertPermanentWidget(0,statusProgressBar,1);
@@ -512,11 +514,14 @@ void MainWindow::customEvent ( QEvent * event ){
        if (event->type()==10005){
                ProgressEvent* p=(ProgressEvent*) event;
                statusProgressBar->setValue(p->value());
-               statusProgressBar->setFormat("%p done");
-               if (p->value()>0)
+               if (p->value()>0) {
                        statusLabel->setText(tr("Creating Audio Thumbs"));
-               else
+                       statusProgressBar->setVisible(true);
+               }
+               else {
                        statusLabel->setText("");
+                       statusProgressBar->setVisible(false);
+               }
        }
 }
 #include "mainwindow.moc"