emailuis/nmhswidget/src/nmhswidgettitlerow.cpp
changeset 68 83cc6bae1de8
parent 62 a8c646b56683
child 74 6c59112cfd31
--- a/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp	Fri Sep 03 17:52:02 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp	Wed Sep 15 12:09:55 2010 +0300
@@ -298,8 +298,18 @@
     //to avoid opening email account mistakenly  when tabbing expand/collapse button
     //we dont handle events that are on the top, down or right side of the button
     QPointF posFromScene = mapFromScene(event->mapToGraphicsScene(gesture->position()));
-    if(posFromScene.x() < mUnreadCountLabel->geometry().right())
-        {    
+    bool inArea = false;
+    
+    if(this->layoutDirection() == Qt::LeftToRight &&  
+       posFromScene.x() < mUnreadCountLabel->geometry().right()) {
+        inArea = true;
+    }
+    else if(this->layoutDirection() == Qt::RightToLeft && 
+            posFromScene.x() > mUnreadCountLabel->geometry().right()) {
+        inArea = true;
+    }
+    
+    if (inArea) {    
         switch (gesture->state()) {
             case Qt::GestureStarted:
                 setHighlighedFontsColor(true);