From 4315de0e762cc9f33fe3d287549023ade665b45f Mon Sep 17 00:00:00 2001 From: Albert S Date: Fri, 19 Mar 2021 11:55:29 +0100 Subject: [PATCH] EntryPushButton: Hardcode max 256x256 icon size for now While dirty, in practise, this appears to be working more fine than selecting the max size. Some of those were too big. Relevant: #32. --- entrypushbutton.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/entrypushbutton.cpp b/entrypushbutton.cpp index e3c0a32..c9a92c1 100644 --- a/entrypushbutton.cpp +++ b/entrypushbutton.cpp @@ -33,19 +33,7 @@ EntryPushButton::EntryPushButton(const EntryConfig &config) : QPushButton() icon = resolveIcon(config.iconPath); } this->setIcon(icon); - if(!icon.availableSizes().isEmpty()) - { - auto sizes = icon.availableSizes(); - QSize maxSize = sizes.first(); - for(QSize ¤t : sizes) - { - if(current.width() > maxSize.width()) - { - maxSize = current; - } - } - this->setIconSize(maxSize); - } + this->setIconSize(QSize{256, 256}); this->config = config; connect(this, SIGNAL(clicked()), this, SLOT(emitOwnClicked()));