Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > media > main-testing-src > by-pkgid > fc0461a26d7609d682086116df6e70e8 > files > 3

kdepim4-4.3.5-0.1mdv2010.0.src.rpm

Index: korganizer/views/todoview/kotododelegates.cpp
===================================================================
--- korganizer/views/todoview/kotododelegates.cpp
+++ korganizer/views/todoview/kotododelegates.cpp	2010-01-05 14:50:57.000000000 +0100
@@ -455,7 +455,11 @@
 
     painter->restore();
   } else {
-    QStyledItemDelegate::paint( painter, option, index );
+    // align the text at top so that when it has more than two lines
+    // it will just cut the extra lines out instead of aligning centered vertically
+    QStyleOptionViewItem copy = option;
+    copy.displayAlignment = Qt::AlignLeft | Qt::AlignTop;
+    QStyledItemDelegate::paint( painter, copy, index );
   }
 }