[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/apps/plasma/applets/folderview
From: Fredrik Höglund <fredrik () kde ! org>
Date: 2010-02-02 0:32:50
Message-ID: 1265070770.740213.22318.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1083827 by fredrik:
Process the string with KStringHandler::preProcessWrap() before
adding it to the QTextLayout.
M +4 -1 iconview.cpp
--- trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.cpp #1083826:1083827
@@ -44,6 +44,7 @@
#include <KGlobalSettings>
#include <KIcon>
#include <KProtocolInfo>
+#include <KStringHandler>
#include <KIO/NetAccess>
@@ -1057,8 +1058,10 @@
// Draw the text label
// ===================
+ const QString text = index.data(Qt::DisplayRole).toString();
+
QTextLayout layout;
- layout.setText(index.data(Qt::DisplayRole).toString());
+ layout.setText(KStringHandler::preProcessWrap(text));
layout.setFont(font);
const QSize size = doTextLayout(layout, tr.size(), Qt::AlignHCenter,
QTextOption::WrapAtWordBoundaryOrAnywhere);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic