summaryrefslogtreecommitdiff
path: root/src/lineedit_with_icon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lineedit_with_icon.cpp')
-rw-r--r--src/lineedit_with_icon.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lineedit_with_icon.cpp b/src/lineedit_with_icon.cpp
index 29ef575..2867a09 100644
--- a/src/lineedit_with_icon.cpp
+++ b/src/lineedit_with_icon.cpp
@@ -35,7 +35,7 @@ void LineEditWithIcon::setIcon(const QPixmap & pixmap) {
QPixmap p = pixmap;
//qDebug("height: %d, icon height: %d", height(), p.height());
int max_height = 16;
- if (max_height > height()) max_height = height() - 4;
+ if (max_height > height() && height() >= 8) max_height = height() - 4;
if (pixmap.height() > max_height) p = pixmap.scaledToHeight(max_height, Qt::SmoothTransformation);
button->setIcon(p);
button->setStyleSheet("QToolButton { border: none; padding: 0px; }");