From a99348551676804ecd2488aa863b19c013db2425 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Tue, 21 Nov 2017 18:18:01 -0700 Subject: [PATCH] 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 --- src/statusbar/dolphinstatusbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 9fc559eb75..f3b6c7bdd4 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -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