]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/selectiontoggle.cpp
Update selection toggle icon when the icon theme has been changed. Thanks to David...
[dolphin.git] / src / selectiontoggle.cpp
index fa10c7559a6bcf4ccf5e84c448b85e7e1d9c4b49..b9b79def01af8f2834936e2e85909ccac59d03c7 100644 (file)
@@ -44,6 +44,8 @@ SelectionToggle::SelectionToggle(QWidget* parent) :
     setIconOverlay(isChecked());
     connect(this, SIGNAL(toggled(bool)),
             this, SLOT(setIconOverlay(bool)));
+    connect(KGlobalSettings::self(), SIGNAL(iconChanged(int)),
+            this, SLOT(refreshIcon()));
 }
 
 SelectionToggle::~SelectionToggle()
@@ -177,12 +179,17 @@ void SelectionToggle::setIconOverlay(bool checked)
     update();
 }
 
+void SelectionToggle::refreshIcon()
+{
+    setIconOverlay(isChecked());
+}
+
 void SelectionToggle::startFading()
 {
     Q_ASSERT(m_fadingTimeLine == 0);
 
     const bool animate = KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects;
-    const int duration = animate ? 1500 : 1;
+    const int duration = animate ? 600 : 1;
 
     m_fadingTimeLine = new QTimeLine(duration, this);
     connect(m_fadingTimeLine, SIGNAL(frameChanged(int)),