mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 09:20:13 +00:00
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
This commit is contained in:
parent
26b8e974f5
commit
f047b566cf
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue