emailuis/nmhswidget/src/nmhswidgettitlerow.cpp
changeset 75 47d84de1c893
parent 65 478bc57ad291
--- a/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp	Fri Sep 17 08:27:21 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp	Mon Oct 04 00:05:37 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);