]> cloud.milkyroute.net Git - dolphin.git/commitdiff
fixed wrong logic for showing the space info: if the progress bar is shown, the space...
authorPeter Penz <peter.penz19@gmail.com>
Tue, 1 Jul 2008 19:08:17 +0000 (19:08 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 1 Jul 2008 19:08:17 +0000 (19:08 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=826897

src/dolphinstatusbar.cpp

index 84012e4380b06f5d7ec39cb30482b56edbccde4d..bd9b8bee8aef292c286298cf9479769e4e249c9f 100644 (file)
@@ -116,7 +116,7 @@ void DolphinStatusBar::setProgress(int percent)
 
     m_progressBar->setValue(m_progress);
     if (!m_progressBar->isVisible() || (percent == 100)) {
 
     m_progressBar->setValue(m_progress);
     if (!m_progressBar->isVisible() || (percent == 100)) {
-        QTimer::singleShot(500, this, SLOT(updateProgressInfo()));
+        QTimer::singleShot(300, this, SLOT(updateProgressInfo()));
     }
 
     const QString& defaultText = m_messageLabel->defaultText();
     }
 
     const QString& defaultText = m_messageLabel->defaultText();
@@ -179,13 +179,12 @@ void DolphinStatusBar::showSpaceInfo()
     const bool isProgressBarVisible = m_progressBar->isVisible();
 
     if (m_spaceInfo->isVisible()) {
     const bool isProgressBarVisible = m_progressBar->isVisible();
 
     if (m_spaceInfo->isVisible()) {
-        // The space information is shown currently. Hide it
-        // if the progress bar is visible or if the status bar
-        // text does not fit into the available width.
-        if (isProgressBarVisible || (widthGap > 0)) {
+        // The space information is shown currently. Hide it if
+        // the status bar text does not fit into the available width.
+        if (widthGap > 0) {
             m_spaceInfo->hide();
         }
             m_spaceInfo->hide();
         }
-    } else if (widthGap + m_spaceInfo->width() <= 0) {
+    } else if (!isProgressBarVisible && (widthGap + m_spaceInfo->width() <= 0)) {
         m_spaceInfo->show();
     }
 }
         m_spaceInfo->show();
     }
 }