diff widgets/SelectableLabel.cpp @ 425:4a5fe5471282

* More transform finder stuff
author Chris Cannam
date Mon, 29 Sep 2008 16:31:49 +0000
parents 374b72f5b4bb
children f8fcfbe13c8f
line wrap: on
line diff
--- a/widgets/SelectableLabel.cpp	Mon Sep 29 15:06:43 2008 +0000
+++ b/widgets/SelectableLabel.cpp	Mon Sep 29 16:31:49 2008 +0000
@@ -35,6 +35,7 @@
 void
 SelectableLabel::setUnselectedText(QString text)
 {
+    if (m_unselectedText == text) return;
     m_unselectedText = text;
     if (!m_selected) {
         setText(m_unselectedText);
@@ -45,6 +46,7 @@
 void
 SelectableLabel::setSelectedText(QString text)
 {
+    if (m_selectedText == text) return;
     m_selectedText = text;
     if (m_selected) {
         setText(m_selectedText);
@@ -63,8 +65,8 @@
             (QString("QLabel:hover { background: %1; color: %3; } "
                      "QLabel:!hover { background: %2; color: %3 } "
                      "QLabel { padding: 7px }")
-             .arg(palette.button().color().name())
-             .arg(palette.mid().color().light().name())
+             .arg(palette.mid().color().lighter(120).name())
+             .arg(palette.mid().color().lighter(140).name())
              .arg(palette.text().color().name()));
     } else {
         setWordWrap(false);