Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f047b566 authored by Diego Gangl's avatar Diego Gangl Committed by Elvis Angelaccio

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
parent 26b8e974
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment