[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-31 10:04:58
Message-ID: 20101231100458.D6864AC8AE () svn ! kde ! org
[Download RAW message or body]

SVN commit 1210412 by hpereiradacosta:

Changed logic for option-driven disabling keyboard accelerators.
Fixes bug in e.g. systemsettings
CCBUG: 260825 


 M  +5 -4      oxygenstyle.cpp  
 M  +2 -2      oxygenstyle.h  


--- trunk/KDE/kdebase/workspace/kstyles/oxygen/oxygenstyle.cpp #1210411:1210412
@@ -152,7 +152,7 @@
         _subLineButtons( SingleButton ),
         _singleButtonHeight( 14 ),
         _doubleButtonHeight( 28 ),
-        _mnemonic( Qt::TextShowMnemonic ),
+        _showMnemonics( true ),
         _helper( new StyleHelper( "oxygen" ) ),
         _animations( new Animations( this ) ),
         _transitions( new Transitions( this ) ),
@@ -1138,10 +1138,11 @@
         const QString &text, QPalette::ColorRole textRole ) const
     {
 
-        if( ( flags & Qt::TextShowMnemonic ) || !( flags&Qt::TextHideMnemonic ) )
+        // hide mnemonics if requested
+        if( (!_showMnemonics) && ( flags & Qt::TextShowMnemonic ) && !( flags&Qt::TextHideMnemonic ) )
         {
             flags &= ~Qt::TextShowMnemonic;
-            flags |= _mnemonic;
+            flags |= Qt::TextHideMnemonic;
         }
 
         if( animations().widgetEnabilityEngine().enabled() )
@@ -7817,7 +7818,7 @@
         _singleButtonHeight = qMax( StyleConfigData::scrollBarWidth() * 7 / 10, 14 );
         _doubleButtonHeight = 2*_singleButtonHeight;
 
-        _mnemonic = StyleConfigData::showMnemonics() ? Qt::TextShowMnemonic : Qt::TextHideMnemonic;
+        _showMnemonics = StyleConfigData::showMnemonics();
 
         // scrollbar buttons
         switch( StyleConfigData::scrollBarAddLineButtons() )
--- trunk/KDE/kdebase/workspace/kstyles/oxygen/oxygenstyle.h #1210411:1210412
@@ -910,8 +910,8 @@
         int _singleButtonHeight;
         int _doubleButtonHeight;
 
-        // mnemonic state
-        Qt::TextFlag _mnemonic;
+        // true if keyboard accelerators must be drawn
+        bool _showMnemonics;
 
         //! helper
         StyleHelper* _helper;
[prev in list] [next in list] [prev in thread] [next in thread] 

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