+ showSpaceInfo();
+}
+
+void DolphinStatusBar::showSpaceInfo()
+{
+ const int widthGap = m_messageLabel->widthGap();
+ 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.
+ const QSize size(m_progressBar->sizeHint());
+ if (isProgressBarVisible || (widthGap > 0)) {
+ m_spaceInfo->hide();
+ }
+ }
+ else if (widthGap + m_spaceInfo->width() <= 0) {
+ m_spaceInfo->show();
+ }