summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/loginform.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/loginform.cpp b/src/loginform.cpp
index b193cb1..a7252b5 100644
--- a/src/loginform.cpp
+++ b/src/loginform.cpp
@@ -58,8 +58,7 @@ void LoginForm::initialize()
if (!size.isValid()) {
size = ui->iconLabel->maximumSize();
} else {
- QSize o(ui->iconLabel->maximumSize());
- size = QSize(qMin(size.width(), o.width()), qMin(size.height(), o.height()));
+ size = size.boundedTo(ui->iconLabel->maximumSize()).expandedTo(ui->iconLabel->minimumSize());
}
pixmap = QIcon(path).pixmap(size);
}