mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Elide the label text on the statusbar in the middle
Summary: BUG: 387189 Currently the label text on the statusbar is elided in on the right, but that means that when the text gets elided the size of the file isn't shown. The label text on the statusbar shows the file name, the mime type and the size; the name is already shown in the main window and the mimetype can usually be guessed from the icon or from the extension, so it's usually the size that the user wants to see on the statusbar. Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: elvisangelaccio, ngraham, anthonyfieroni Differential Revision: https://phabricator.kde.org/D8927
This commit is contained in:
parent
f024c3c01f
commit
a993485516
|
@ -323,7 +323,7 @@ void DolphinStatusBar::updateLabelText()
|
|||
|
||||
// Set status bar text and elide it if too long
|
||||
QFontMetrics fontMetrics(m_label->font());
|
||||
const QString elidedText = fontMetrics.elidedText(text, Qt::ElideRight, m_label->width());
|
||||
const QString elidedText = fontMetrics.elidedText(text, Qt::ElideMiddle, m_label->width());
|
||||
m_label->setText(elidedText);
|
||||
|
||||
// If the text has been elided, set the original text as tooltip
|
||||
|
|
Loading…
Reference in a new issue