diff options
| author | Peter Penz <[email protected]> | 2009-08-29 20:26:29 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-08-29 20:26:29 +0000 |
| commit | 136e2ae3d75677ec008e7b5973b8e73bc38e9530 (patch) | |
| tree | 00746bed2383d800b36c0173381d397a8c9ad7dc /src | |
| parent | 625cfd274375614fb85100cf4adc06244ff16cf8 (diff) | |
- fixed issue that the horizontal progress bar and the space info bar get hidden sometimes when changing the setting
- use less vertical space for the capacity bar (thanks to Rafael Fernández López for the patch!)
svn path=/trunk/KDE/kdebase/apps/; revision=1017172
Diffstat (limited to 'src')
| -rw-r--r-- | src/statusbar/dolphinstatusbar.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 802717423..c36651e0b 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -108,10 +108,10 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : // initialize sizes const int fontHeight = QFontMetrics(m_messageLabel->font()).height(); const int zoomWidgetHeight = m_zoomWidget->minimumSizeHint().height(); - const int contentHeight = (fontHeight < zoomWidgetHeight) ? zoomWidgetHeight : fontHeight; + const int contentHeight = qMax(fontHeight, zoomWidgetHeight); m_messageLabel->setMinimumTextHeight(contentHeight); - m_spaceInfo->setFixedHeight(contentHeight); + m_spaceInfo->setFixedHeight(contentHeight - 5); m_progressBar->setFixedSize(200, contentHeight); m_zoomWidget->setFixedSize(150, contentHeight); @@ -290,18 +290,13 @@ void DolphinStatusBar::assureVisibleText() if (m_spaceInfo->isVisible() || m_zoomWidget->isVisible()) { // At least the space information or the zoom slider is shown. // Hide them if the status bar text does not fit into the available width. - if (widthGap > 0) { - setExtensionsVisible(false); - } + setExtensionsVisible(widthGap <= 0); } else if (!m_progressBar->isVisible()) { const GeneralSettings* settings = DolphinSettings::instance().generalSettings(); const int spaceInfoWidth = settings->showSpaceInfo() ? m_spaceInfo->minimumWidth() : 0; const int zoomWidgetWidth = settings->showZoomSlider() ? m_zoomWidget->minimumWidth() : 0; const int widgetsWidth = spaceInfoWidth + zoomWidgetWidth; - - if (widthGap + widgetsWidth <= 0) { - setExtensionsVisible(true); - } + setExtensionsVisible(widthGap + widgetsWidth <= 0); } } |
