mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Fixes display issues of Dolphin statusbar widgets when a high DPI value is used (>= 196 for example).
BUG: 334271 REVIEW: 119701 FIXED-IN: 4.14.1
This commit is contained in:
parent
c7e300db90
commit
b73aeb4598
|
@ -109,18 +109,19 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
||||||
const int zoomSliderHeight = m_zoomSlider->minimumSizeHint().height();
|
const int zoomSliderHeight = m_zoomSlider->minimumSizeHint().height();
|
||||||
const int contentHeight = qMax(fontHeight, zoomSliderHeight);
|
const int contentHeight = qMax(fontHeight, zoomSliderHeight);
|
||||||
|
|
||||||
|
QFontMetrics fontMetrics(m_label->font());
|
||||||
|
|
||||||
m_label->setFixedHeight(contentHeight);
|
m_label->setFixedHeight(contentHeight);
|
||||||
m_label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
m_label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
|
||||||
m_zoomSlider->setFixedHeight(contentHeight);
|
m_zoomSlider->setMaximumWidth(fontMetrics.averageCharWidth() * 15);
|
||||||
m_zoomSlider->setMaximumWidth(150);
|
|
||||||
|
|
||||||
m_spaceInfo->setFixedHeight(contentHeight);
|
m_spaceInfo->setFixedHeight(contentHeight);
|
||||||
m_spaceInfo->setMaximumWidth(150);
|
m_spaceInfo->setMaximumWidth(fontMetrics.averageCharWidth() * 15);
|
||||||
m_spaceInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
m_spaceInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
|
||||||
m_progressBar->setFixedHeight(contentHeight);
|
m_progressBar->setFixedHeight(contentHeight);
|
||||||
m_progressBar->setMaximumWidth(150);
|
m_progressBar->setMaximumWidth(fontMetrics.averageCharWidth() * 15);
|
||||||
|
|
||||||
QHBoxLayout* topLayout = new QHBoxLayout(this);
|
QHBoxLayout* topLayout = new QHBoxLayout(this);
|
||||||
topLayout->setMargin(0);
|
topLayout->setMargin(0);
|
||||||
|
|
Loading…
Reference in a new issue