|
extragear/graphics/kst/kst: msg#00196kde.kst
SVN commit 437693 by arwalker: BUG:104347 Add tooltips. M +13 -4 statuslabel.cpp --- trunk/extragear/graphics/kst/kst/statuslabel.cpp #437692:437693 @@ -36,7 +36,7 @@ } void StatusLabel::setFullText() { - QToolTip::remove( this ); + QToolTip::remove(this); QToolTip::hide(); setMaximumWidth(32767); @@ -46,16 +46,25 @@ void StatusLabel::setTextWidth(const QFontMetrics &metrics, int width) { QString str; + QToolTip::remove(this); + if (width < 0) { width = 0; } + setMaximumWidth(width); + str = KStringHandler::rPixelSqueeze(_fullText, metrics, width); if (str.length() > _fullText.length()) { - setText(i18n("ellipsis","...")); - } else { - setText(str); + // + // required because of a bug in KStringHandler that returns _fullText appended by ... + // + QToolTip::add(this, _fullText); + str = i18n("ellipsis","..."); + } else if (str != _fullText) { + QToolTip::add(this, _fullText); } + setText(str); } void StatusLabel::setFullText(const QString &text) { |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [Bug 104347] window width is widened automatically when the status bar needs more room: 00196, Andrew Walker |
|---|---|
| Next by Date: | extragear/graphics/kst/kst: 00196, Andrew Walker |
| Previous by Thread: | extragear/graphics/kst/ksti: 00196, Andrew Walker |
| Next by Thread: | extragear/graphics/kst/kst: 00196, Andrew Walker |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |