[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/ktouch
From:       Diego Iastrubni <elcuco () kde ! org>
Date:       2007-12-13 20:35:11
Message-ID: 1197578111.542674.9835.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 748195 by iastrubni:

Introduce an Hebrew key map

Set the direction of the student's text according to the teacher, and not to the \
direction of the parent. Now Hebrew/Arabic/Farsi text will start at the right, and \
not  left. However, the direction of the text is not set properly. To see the problem \
load ktouch using "ktouch --reverse" and when trying a lecture see where the space  \
between words is (it's on the right for English texts. The exact problem happens when \
loading Hebrew in LTR UI. I am not sure how to fix this, since the text is printed  \
by QGraphicsSimpleTextItem which does not provide a way to set the text "layout" \
direction. Next - look at the sources, maybe I can properly fix this.

BUG: 128268



 A             keyboards/he.keyboard.xml  
 M  +2 -0      src/ktouchtextlinewidget.cpp  


--- trunk/KDE/kdeedu/ktouch/src/ktouchtextlinewidget.cpp #748194:748195
@@ -77,6 +77,8 @@
 
 
 void KTouchTextLineWidget::setTeacherText(const QString& text) {
+    direction = text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight;
+    setLayoutDirection( direction );
     teacher->setText(text);
     recalculateSize();
     setStudentText("");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic