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

List:       kde-commits
Subject:    KDE/kdebase/workspace/kstyles/oxygen
From:       Hugo Pereira Da Costa <hugo () oxygen-icons ! org>
Date:       2010-12-17 15:16:34
Message-ID: 20101217151634.C4214AC8A8 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1207337 by hpereiradacosta:

Fixed positioning of text and icon in rlt mode.
BUG: 260368


 M  +7 -5      oxygenstyle.cpp  


--- trunk/KDE/kdebase/workspace/kstyles/oxygen/oxygenstyle.cpp #1207336:1207337
@@ -5412,13 +5412,15 @@
         // make room for left and right widgets
         // left widget
         const bool verticalTabs( isVerticalTab( tabOpt ) );
+        const bool hasLeftButton( !( option->direction == Qt::RightToLeft ? \
tabOptV3.rightButtonSize.isEmpty():tabOptV3.leftButtonSize.isEmpty() ) ); +        \
const bool hasRightButton( !( option->direction == Qt::RightToLeft ? \
tabOptV3.leftButtonSize.isEmpty():tabOptV3.rightButtonSize.isEmpty() ) );  
-        if( !tabOptV3.leftButtonSize.isEmpty() )
+        if( hasLeftButton )
         { r.setLeft( r.left() + 4 + ( verticalTabs ? \
tabOptV3.leftButtonSize.height() : tabOptV3.leftButtonSize.width() ) ); }  
         // make room for left and right widgets
         // left widget
-        if( !tabOptV3.rightButtonSize.isEmpty() )
+        if( hasRightButton )
         { r.setRight( r.right() - 4 - ( verticalTabs ? \
tabOptV3.rightButtonSize.height() : tabOptV3.rightButtonSize.width() ) ); }  
         // compute textRect and iconRect
@@ -5446,10 +5448,10 @@
 
         }
 
-        if( verticalTabs )
+        if( !verticalTabs )
         {
-            textRect = handleRTL( option, textRect );
-            iconRect = handleRTL( option, iconRect );
+            textRect = visualRect(option->direction, r, textRect );
+            iconRect = visualRect(option->direction, r, iconRect );
         }
 
         // render icon


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

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