mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Do not use fixed widths for the widgets in the status bar
This fixes the problem that the Dolphin window has a rather large minimum size. A side effect of this was that splitting the view could resize the window (because twice the minimum status bar width was needed then). BUG: 319373 REVIEW: 110966 FIXED-IN: 4.10.5
This commit is contained in:
parent
bc9f7b8527
commit
030acf4f11
|
@ -107,14 +107,18 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
|||
const int zoomSliderHeight = m_zoomSlider->minimumSizeHint().height();
|
||||
const int contentHeight = qMax(fontHeight, zoomSliderHeight);
|
||||
|
||||
m_label->setMinimumHeight(contentHeight);
|
||||
m_label->setMaximumHeight(contentHeight);
|
||||
m_label->setFixedHeight(contentHeight);
|
||||
m_label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
|
||||
const QSize size(150, contentHeight);
|
||||
applyFixedWidgetSize(m_spaceInfo, size);
|
||||
applyFixedWidgetSize(m_progressBar, size);
|
||||
applyFixedWidgetSize(m_zoomSlider, size);
|
||||
m_zoomSlider->setFixedHeight(contentHeight);
|
||||
m_zoomSlider->setMaximumWidth(150);
|
||||
|
||||
m_spaceInfo->setFixedHeight(contentHeight);
|
||||
m_spaceInfo->setMaximumWidth(150);
|
||||
m_spaceInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
|
||||
m_progressBar->setFixedHeight(contentHeight);
|
||||
m_progressBar->setMaximumWidth(150);
|
||||
|
||||
QHBoxLayout* topLayout = new QHBoxLayout(this);
|
||||
topLayout->setMargin(0);
|
||||
|
@ -349,11 +353,4 @@ void DolphinStatusBar::updateZoomSliderToolTip(int zoomLevel)
|
|||
m_zoomSlider->setToolTip(i18ncp("@info:tooltip", "Size: 1 pixel", "Size: %1 pixels", size));
|
||||
}
|
||||
|
||||
void DolphinStatusBar::applyFixedWidgetSize(QWidget* widget, const QSize& size)
|
||||
{
|
||||
widget->setMinimumSize(size);
|
||||
widget->setMaximumSize(size);
|
||||
widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
}
|
||||
|
||||
#include "dolphinstatusbar.moc"
|
||||
|
|
|
@ -137,8 +137,6 @@ private:
|
|||
*/
|
||||
void updateZoomSliderToolTip(int zoomLevel);
|
||||
|
||||
void applyFixedWidgetSize(QWidget* widget, const QSize& size);
|
||||
|
||||
private:
|
||||
QString m_text;
|
||||
QString m_defaultText;
|
||||
|
|
Loading…
Reference in a new issue