]> git.sur5r.net Git - minitube/commitdiff
ESC clears search box
authorFlavio <flavio@odisseo.local>
Fri, 5 Aug 2011 18:53:44 +0000 (20:53 +0200)
committerFlavio <flavio@odisseo.local>
Fri, 5 Aug 2011 18:53:44 +0000 (20:53 +0200)
src/searchlineedit.cpp

index e63fbd951f9682359056ea799e6c03f24fcfef79..65da3c5134210a0d7846dbd846f8c6fb1f70754b 100644 (file)
@@ -56,6 +56,7 @@ ClearButton::ClearButton(QWidget *parent)
     setToolTip(tr("Clear"));
     setVisible(false);
     setFocusPolicy(Qt::NoFocus);
+    setShortcut(QKeySequence(Qt::Key_Escape));
 }
 
 void ClearButton::paintEvent(QPaintEvent *event)
@@ -65,7 +66,7 @@ void ClearButton::paintEvent(QPaintEvent *event)
     int height = this->height();
 
     painter.setRenderHint(QPainter::Antialiasing, true);
-    QColor color = palette().color(QPalette::Mid);
+    // QColor color = palette().color(QPalette::Mid);
     painter.setBrush(isDown()
                      ? palette().color(QPalette::Dark)
                          : palette().color(QPalette::Mid));