mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Remove fix macos specific image loading for retina.
This commit is contained in:
parent
afdd96c2e0
commit
f504c83436
@ -21,24 +21,11 @@ YACReaderLibraryItemWidget::YACReaderLibraryItemWidget(QString n /*ame*/, QStrin
|
|||||||
nameLabel = new QLabel(name, this);
|
nameLabel = new QLabel(name, this);
|
||||||
|
|
||||||
options = new QToolButton(this);
|
options = new QToolButton(this);
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
//TODO fix this crazy hack for having a propper retina icon for the options
|
options->setIcon(QIcon(QPixmap(":/images/sidebar/libraryOptions.png")));
|
||||||
//this hack has been perpetrated using Qt 5.5.0
|
|
||||||
QString sourceOptionsImage;
|
|
||||||
if (devicePixelRatio() > 1)
|
|
||||||
sourceOptionsImage = ":/images/sidebar/libraryOptions@2x.png";
|
|
||||||
else
|
|
||||||
sourceOptionsImage = ":/images/sidebar/libraryOptions.png";
|
|
||||||
QPixmap iconOptionsPixmap(sourceOptionsImage);
|
|
||||||
iconOptionsPixmap.setDevicePixelRatio(devicePixelRatio());
|
|
||||||
QLabel *helperLabel = new QLabel(options);
|
|
||||||
helperLabel->move(4, 2);
|
|
||||||
helperLabel->setFixedSize(14, 14);
|
|
||||||
helperLabel->setPixmap(iconOptionsPixmap);
|
|
||||||
#else
|
|
||||||
options->setIcon(QIcon(":/images/sidebar/libraryOptions.png"));
|
|
||||||
#endif
|
|
||||||
options->setHidden(true);
|
options->setHidden(true);
|
||||||
|
|
||||||
options->setFixedWidth(18);
|
options->setFixedWidth(18);
|
||||||
options->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
options->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
||||||
options->setStyleSheet("QToolButton {border:none;}");
|
options->setStyleSheet("QToolButton {border:none;}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user