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

List:       kde-commits
Subject:    kdeextragear-1/amarok/src/statusbar
From:       Mark Kretschmann <markey () web ! de>
Date:       2005-02-16 8:56:16
Message-ID: 20050216085616.819A31D20E () office ! kde ! org
[Download RAW message or body]

CVS commit by markey: 

Make tooltip for Random/Repeat always reflect current on/off state.

CCMAIL: amarok-devel@lists.sf.net


  M +15 -7     toggleLabel.h   1.5


--- kdeextragear-1/amarok/src/statusbar/toggleLabel.h  #1.4:1.5
@@ -50,11 +50,5 @@ public:
 
         setChecked( isChecked() );
-
-        QString tip = "<qt><img src='%1' style='margin:auto'><br>&nbsp;";
-        tip += action->isChecked() ? i18n("%2: on") : i18n("%2: off");
-        tip += "&nbsp;";
-        const QString path = KGlobal::iconLoader()->iconPath( action->icon(), \
                -KIcon::SizeHuge );
-
-        QToolTip::add( this, tip.arg( path ).arg( action->text().remove('&') ) );
+        setToolTip();
     }
 
@@ -80,5 +74,19 @@ public slots:
     {
         setPixmap( m_action->iconSet().pixmap( QIconSet::Small, on ? \
QIconSet::Normal : QIconSet::Disabled ) ); +        setToolTip();
+    }
+
+private:
+    void setToolTip()
+    {
+        QString tip = "<qt><img src='%1' style='margin:auto'><br>&nbsp;";
+        tip += m_action->isChecked() ? i18n("%2: on") : i18n("%2: off");
+        tip += "&nbsp;";
+        const QString path = KGlobal::iconLoader()->iconPath( m_action->icon(), \
-KIcon::SizeHuge ); +
+        QToolTip::remove( this );
+        QToolTip::add( this, tip.arg( path ).arg( m_action->text().remove('&') ) );
     }
+
 };
 


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

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