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.
This commit is contained in:
Albert S. 2021-03-19 11:55:29 +01:00
parent f0387db468
commit 4315de0e76

View File

@ -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 &current : 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()));