]> 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 14ec048404714d760c541ed28a5c0c8b0a243502..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,6 +179,11 @@ void SelectionToggle::setIconOverlay(bool checked)
     update();
 }
 
+void SelectionToggle::refreshIcon()
+{
+    setIconOverlay(isChecked());
+}
+
 void SelectionToggle::startFading()
 {
     Q_ASSERT(m_fadingTimeLine == 0);