]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/FancyLineEdit.cpp
Fix handling of the add branch textfield in GuiBranches
[lyx.git] / src / frontends / qt4 / FancyLineEdit.cpp
index da4dc7e1a6a98dd76e4faaa1cc67263bde2e7b7a..1713283e0a7644770debcccd4af1eef485f7187a 100644 (file)
@@ -13,6 +13,8 @@
 
 #include "FancyLineEdit.h"
 
+#if QT_VERSION >= 0x040600
+
 #include <QtCore/QEvent>
 #include <QtCore/QDebug>
 #include <QtCore/QString>
@@ -26,8 +28,6 @@
 #include <QtGui/QStyle>
 #include <QtGui/QPaintEvent>
 
-#if QT_VERSION >= 0x040600
-
 enum { margin = 6 };
 
 #define ICONBUTTON_HEIGHT 18
@@ -271,11 +271,6 @@ IconButton::IconButton(QWidget *parent)
 void IconButton::paintEvent(QPaintEvent *)
 {
     QPainter painter(this);
-    // Note isDown should really use the active state but in most styles
-    // this has no proper feedback
-    QIcon::Mode state = QIcon::Disabled;
-    if (isEnabled())
-        state = isDown() ? QIcon::Selected : QIcon::Normal;
     QRect pixmapRect = QRect(0, 0, m_pixmap.width(), m_pixmap.height());
     pixmapRect.moveCenter(rect().center());