mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Add explanatory label to status bar's icon size slider
Right now the slider has no label. Let's add one so it's clear what it does. BUG: 429255 FIXED-IN: 21.04
This commit is contained in:
parent
8236e95c76
commit
0ba739c47e
|
@ -34,6 +34,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
||||||
m_text(),
|
m_text(),
|
||||||
m_defaultText(),
|
m_defaultText(),
|
||||||
m_label(nullptr),
|
m_label(nullptr),
|
||||||
|
m_zoomLabel(nullptr),
|
||||||
m_spaceInfo(nullptr),
|
m_spaceInfo(nullptr),
|
||||||
m_zoomSlider(nullptr),
|
m_zoomSlider(nullptr),
|
||||||
m_progressBar(nullptr),
|
m_progressBar(nullptr),
|
||||||
|
@ -48,6 +49,9 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
||||||
m_label->setWordWrap(true);
|
m_label->setWordWrap(true);
|
||||||
m_label->setTextFormat(Qt::PlainText);
|
m_label->setTextFormat(Qt::PlainText);
|
||||||
|
|
||||||
|
// Initialize zoom slider's explanatory label
|
||||||
|
m_zoomLabel = new QLabel(i18nc("Used as a noun, i.e. 'Here is the zoom level:'","Zoom:"), this);
|
||||||
|
|
||||||
// Initialize zoom widget
|
// Initialize zoom widget
|
||||||
m_zoomSlider = new QSlider(Qt::Horizontal, this);
|
m_zoomSlider = new QSlider(Qt::Horizontal, this);
|
||||||
m_zoomSlider->setAccessibleName(i18n("Zoom"));
|
m_zoomSlider->setAccessibleName(i18n("Zoom"));
|
||||||
|
@ -113,6 +117,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
||||||
topLayout->setContentsMargins(2, 0, 2, 0);
|
topLayout->setContentsMargins(2, 0, 2, 0);
|
||||||
topLayout->setSpacing(4);
|
topLayout->setSpacing(4);
|
||||||
topLayout->addWidget(m_label, 1);
|
topLayout->addWidget(m_label, 1);
|
||||||
|
topLayout->addWidget(m_zoomLabel);
|
||||||
topLayout->addWidget(m_zoomSlider, 1);
|
topLayout->addWidget(m_zoomSlider, 1);
|
||||||
topLayout->addWidget(m_spaceInfo, 1);
|
topLayout->addWidget(m_spaceInfo, 1);
|
||||||
topLayout->addWidget(m_stopButton);
|
topLayout->addWidget(m_stopButton);
|
||||||
|
@ -324,5 +329,6 @@ void DolphinStatusBar::setExtensionsVisible(bool visible)
|
||||||
m_spaceInfo->setShown(showSpaceInfo);
|
m_spaceInfo->setShown(showSpaceInfo);
|
||||||
m_spaceInfo->setVisible(showSpaceInfo);
|
m_spaceInfo->setVisible(showSpaceInfo);
|
||||||
m_zoomSlider->setVisible(showZoomSlider);
|
m_zoomSlider->setVisible(showZoomSlider);
|
||||||
|
m_zoomLabel->setVisible(showZoomSlider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,7 @@ private:
|
||||||
QString m_text;
|
QString m_text;
|
||||||
QString m_defaultText;
|
QString m_defaultText;
|
||||||
KSqueezedTextLabel* m_label;
|
KSqueezedTextLabel* m_label;
|
||||||
|
QLabel* m_zoomLabel;
|
||||||
StatusBarSpaceInfo* m_spaceInfo;
|
StatusBarSpaceInfo* m_spaceInfo;
|
||||||
|
|
||||||
QSlider* m_zoomSlider;
|
QSlider* m_zoomSlider;
|
||||||
|
|
Loading…
Reference in a new issue