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:
parent
f0387db468
commit
4315de0e76
@ -33,19 +33,7 @@ EntryPushButton::EntryPushButton(const EntryConfig &config) : QPushButton()
|
|||||||
icon = resolveIcon(config.iconPath);
|
icon = resolveIcon(config.iconPath);
|
||||||
}
|
}
|
||||||
this->setIcon(icon);
|
this->setIcon(icon);
|
||||||
if(!icon.availableSizes().isEmpty())
|
this->setIconSize(QSize{256, 256});
|
||||||
{
|
|
||||||
auto sizes = icon.availableSizes();
|
|
||||||
QSize maxSize = sizes.first();
|
|
||||||
for(QSize ¤t : sizes)
|
|
||||||
{
|
|
||||||
if(current.width() > maxSize.width())
|
|
||||||
{
|
|
||||||
maxSize = current;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this->setIconSize(maxSize);
|
|
||||||
}
|
|
||||||
this->config = config;
|
this->config = config;
|
||||||
connect(this, SIGNAL(clicked()), this, SLOT(emitOwnClicked()));
|
connect(this, SIGNAL(clicked()), this, SLOT(emitOwnClicked()));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user