File r893437.diff of Package kdepim4
Subject: korganizer: fix missing RTL text in monthviews
From: wstephenson@suse.de
Bug:
Patch-upstream: 893437
--- korganizer/views/monthview/monthgraphicsitems.cpp (revision 893436)
+++ korganizer/views/monthview/monthgraphicsitems.cpp (revision 893437)
@@ -96,7 +96,7 @@ bool MonthCell::hasEventBelow( int heigh
return false;
}
- for ( int i=0; i<height; i++ ) {
+ for ( int i = 0; i < height; ++i ) {
if ( mHeightHash.value( i ) != 0 ) {
return true;
}
@@ -275,6 +275,9 @@ void MonthGraphicsItem::paint( QPainter
QString text = mMonthItem->text( !isBeginItem() );
p->setFont( KOPrefs::instance()->monthViewFont() );
+ // Every item should set its own LayoutDirection, or eliding fails miserably
+ p->setLayoutDirection( text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight );
+
QRect textRect = QRect( textMargin, 0,
boundingRect().width() - 2 * textMargin, scene->itemHeight() );
Index: korganizer/views/monthview/monthgraphicsitems.cpp
===================================================================