From f504c8343697c33bf26e819b3078efd02b321641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 10 Sep 2018 10:54:06 +0200 Subject: [PATCH] Remove fix macos specific image loading for retina. --- .../yacreader_library_item_widget.cpp | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/custom_widgets/yacreader_library_item_widget.cpp b/custom_widgets/yacreader_library_item_widget.cpp index bd3f4333..5f27f017 100644 --- a/custom_widgets/yacreader_library_item_widget.cpp +++ b/custom_widgets/yacreader_library_item_widget.cpp @@ -21,24 +21,11 @@ YACReaderLibraryItemWidget::YACReaderLibraryItemWidget(QString n /*ame*/, QStrin nameLabel = new QLabel(name, this); options = new QToolButton(this); -#ifdef Q_OS_MAC - //TODO fix this crazy hack for having a propper retina icon for the options - //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->setIcon(QIcon(QPixmap(":/images/sidebar/libraryOptions.png"))); + options->setHidden(true); + options->setFixedWidth(18); options->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); options->setStyleSheet("QToolButton {border:none;}");