summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Gangl <[email protected]>2017-11-07 17:32:31 +0100
committerElvis Angelaccio <[email protected]>2017-11-07 17:51:35 +0100
commitf047b566cfe09ae5db23ffd713f464899eea4b40 (patch)
treeca814b639a6d4a6c0589febd3699dbe14d67eda2
parent26b8e974f571b186948169c257fe3ffd6fe54fa7 (diff)
Add more whitespace to the status bar
Summary: This patch gives the status bar a little more vertical whitespace, prevents the status bar from "jumping up and down" when showing a progress bar, and adds a bit of padding on the sides so the labels are more clearly separated when using dual panes. Reviewers: #dolphin, #vdg, ngraham, elvisangelaccio Differential Revision: https://phabricator.kde.org/D8540
-rw-r--r--src/statusbar/dolphinstatusbar.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp
index 38b7ad4..31d4ab8 100644
--- a/src/statusbar/dolphinstatusbar.cpp
+++ b/src/statusbar/dolphinstatusbar.cpp
@@ -107,7 +107,8 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
// Initialize top layout and size policies
const int fontHeight = QFontMetrics(m_label->font()).height();
const int zoomSliderHeight = m_zoomSlider->minimumSizeHint().height();
- const int contentHeight = qMax(fontHeight, zoomSliderHeight);
+ const int buttonHeight = m_stopButton->height();
+ const int contentHeight = qMax(qMax(fontHeight, zoomSliderHeight), buttonHeight);
QFontMetrics fontMetrics(m_label->font());
@@ -116,15 +117,15 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
m_zoomSlider->setMaximumWidth(fontMetrics.averageCharWidth() * 25);
- m_spaceInfo->setFixedHeight(contentHeight);
+ m_spaceInfo->setFixedHeight(zoomSliderHeight);
m_spaceInfo->setMaximumWidth(fontMetrics.averageCharWidth() * 25);
m_spaceInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
- m_progressBar->setFixedHeight(contentHeight);
+ m_progressBar->setFixedHeight(zoomSliderHeight);
m_progressBar->setMaximumWidth(fontMetrics.averageCharWidth() * 25);
QHBoxLayout* topLayout = new QHBoxLayout(this);
- topLayout->setMargin(0);
+ topLayout->setContentsMargins(2, 0, 2, 0);
topLayout->setSpacing(4);
topLayout->addWidget(m_label);
topLayout->addWidget(m_zoomSlider);