Created attachment 51143 [details] Dolphin status bar with text cut off When the window is too narrow, the status bar text gets cut off rather than being elided (see attached screenshot). The fix would be to use a KSqueezedTextLabel.
Forgot to mention: Screenshot is of Dolphin from KDE SC 4.5.1.
This isn't as easy as it sounds. I just gave it a try and simply replacing : m_messageLabel = new KonqStatusBarMessageLabel(this); by m_messageLabel = new KSqueezedTextLabel(this); (in dolphinstatusbar.cpp) isn't possible. That is with some other edits like header file etc... When compiling it misses functions that KonqStatusBarMessageLabel provides, but KSqueezedTextLabel doesn't. Like: ::setDefaultText ::defaultText ::type ::setMessage Subclassing KSqueezedTextLabel is possible. What's your suggestion?
Created attachment 68937 [details] Proposed patch
In respones to Comment #3. The patch introduces elided plain text messeges for KonqStatusBarMessageLabel. P.s.: I neven manage to post a comment and an attachment at the same time.
Thanks Wolfgang for the patch! Sadly it does not work for texts that span multiple lines (e.g. when an error-message is shown). I hope I can do it in time, but for 4.9 I planned to get rid of showing multiline-error-messages in the statusbar, so that your patch can be applied then. I'd suggest that we wait until I committed those changes so that there won't be a need to handle the multiline-case.
In deed there is a flaw for multi line error messages. They get elided, but the height of the widget is increased without being used. Since this is a general purpose widget, do you think mutli line messages can be neglected? The same question applies for rich text messages.
Yep, I'd say this widget should be simplified in a way that multiline messages are definitely not supported. Practically it is only used by Konqueror and Dolphin, so such a behavior change should not result in big troubles.
Git commit 213450d39704fc0154da5f0e45e4198af8239842 by Peter Penz. Committed on 12/04/2012 at 23:57. Pushed by ppenz into branch 'master'. Use KMessageWidget for error- and information-messages See http://agateau.com/2011/04/21/kde-ux-2011/ for more details. This simplifies the statusbar in Dolphin a lot and allows to do a proper eliding in case if status-messages are too long: In this case a tooltip will show the whole status-message (thanks to Wolfgang Mader for the initial patch!). There is still missing some finetuning but the general approach seems to work quite nice. Related: bug 245618, bug 146533 FIXED-IN: 4.9.0 M +14 -20 dolphin/src/dolphinmainwindow.cpp M +2 -2 dolphin/src/dolphinnewfilemenu.cpp M +79 -51 dolphin/src/dolphinviewcontainer.cpp M +28 -10 dolphin/src/dolphinviewcontainer.h M +93 -152 dolphin/src/statusbar/dolphinstatusbar.cpp M +32 -65 dolphin/src/statusbar/dolphinstatusbar.h M +9 -9 dolphin/src/statusbar/statusbarspaceinfo.cpp M +4 -2 dolphin/src/statusbar/statusbarspaceinfo.h http://commits.kde.org/kde-baseapps/213450d39704fc0154da5f0e45e4198af8239842