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:
		| @@ -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())); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user