diff --git a/src/plugins/AutoScroll/autoscroll.qrc b/src/plugins/AutoScroll/autoscroll.qrc index cbcf117c5..ea580faa3 100644 --- a/src/plugins/AutoScroll/autoscroll.qrc +++ b/src/plugins/AutoScroll/autoscroll.qrc @@ -1,8 +1,11 @@ data/scroll_all.png + data/scroll_all@2x.png data/scroll_horizontal.png + data/scroll_horizontal@2x.png data/scroll_vertical.png + data/scroll_vertical@2x.png locale/ar_SA.qm locale/bg_BG.qm locale/ca_ES.qm diff --git a/src/plugins/AutoScroll/autoscroller.cpp b/src/plugins/AutoScroll/autoscroller.cpp index 45811ec48..766aea87f 100644 --- a/src/plugins/AutoScroll/autoscroller.cpp +++ b/src/plugins/AutoScroll/autoscroller.cpp @@ -1,6 +1,6 @@ /* ============================================================ * AutoScroll - Autoscroll for QupZilla -* Copyright (C) 2014-2016 David Rosca +* Copyright (C) 2014-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ #include #include #include +#include AutoScroller::AutoScroller(const QString &settingsFile, QObject* parent) : QObject(parent) @@ -189,20 +190,20 @@ bool AutoScroller::showIndicator(WebView* view, const QPoint &pos) } if (vertical && horizontal) { - m_indicator->setPixmap(QPixmap(":/autoscroll/data/scroll_all.png")); + m_indicator->setPixmap(QIcon(":/autoscroll/data/scroll_all.png").pixmap(32)); } else if (vertical) { - m_indicator->setPixmap(QPixmap(":/autoscroll/data/scroll_vertical.png")); + m_indicator->setPixmap(QIcon(":/autoscroll/data/scroll_vertical.png").pixmap(32)); } else { - m_indicator->setPixmap(QPixmap(":/autoscroll/data/scroll_horizontal.png")); + m_indicator->setPixmap(QIcon(":/autoscroll/data/scroll_horizontal.png").pixmap(32)); } m_view = view; QPoint p; - p.setX(pos.x() - m_indicator->pixmap()->width() / 2); - p.setY(pos.y() - m_indicator->pixmap()->height() / 2); + p.setX(pos.x() - m_indicator->width() / 2); + p.setY(pos.y() - m_indicator->height() / 2); m_indicator->setParent(m_view->overlayWidget()); m_indicator->move(m_view->mapTo(m_view->overlayWidget(), p)); diff --git a/src/plugins/AutoScroll/autoscrollplugin.cpp b/src/plugins/AutoScroll/autoscrollplugin.cpp index 4db8d245c..317f03b93 100644 --- a/src/plugins/AutoScroll/autoscrollplugin.cpp +++ b/src/plugins/AutoScroll/autoscrollplugin.cpp @@ -1,6 +1,6 @@ /* ============================================================ * AutoScroll - Autoscroll for QupZilla -* Copyright (C) 2014 David Rosca +* Copyright (C) 2014-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ PluginSpec AutoScrollPlugin::pluginSpec() spec.description = "Provides support for autoscroll with middle mouse button"; spec.version = "0.2.0"; spec.author = "David Rosca "; - spec.icon = QPixmap(":/autoscroll/data/scroll_all.png"); + spec.icon = QIcon(QSL(":/autoscroll/data/scroll_all.png")).pixmap(32); spec.hasSettings = true; return spec; diff --git a/src/plugins/AutoScroll/autoscrollsettings.cpp b/src/plugins/AutoScroll/autoscrollsettings.cpp index 4a2485717..45fd45167 100644 --- a/src/plugins/AutoScroll/autoscrollsettings.cpp +++ b/src/plugins/AutoScroll/autoscrollsettings.cpp @@ -1,6 +1,6 @@ /* ============================================================ * AutoScroll - Autoscroll for QupZilla -* Copyright (C) 2014 David Rosca +* Copyright (C) 2014-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +27,7 @@ AutoScrollSettings::AutoScrollSettings(AutoScroller* scroller, QWidget* parent) setAttribute(Qt::WA_DeleteOnClose); ui->setupUi(this); ui->divider->setValue(m_scroller->scrollDivider()); + ui->iconLabel->setPixmap(QIcon(QStringLiteral(":/autoscroll/data/scroll_all.png")).pixmap(32)); connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accepted())); connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); diff --git a/src/plugins/AutoScroll/autoscrollsettings.ui b/src/plugins/AutoScroll/autoscrollsettings.ui index 9cbc398eb..b13ec3cd8 100644 --- a/src/plugins/AutoScroll/autoscrollsettings.ui +++ b/src/plugins/AutoScroll/autoscrollsettings.ui @@ -30,11 +30,7 @@ - - - :/autoscroll/data/scroll_all.png - - + @@ -151,8 +147,6 @@ - - - + diff --git a/src/plugins/AutoScroll/data/scroll_all.png b/src/plugins/AutoScroll/data/scroll_all.png index 794da9263..63451879d 100644 Binary files a/src/plugins/AutoScroll/data/scroll_all.png and b/src/plugins/AutoScroll/data/scroll_all.png differ diff --git a/src/plugins/AutoScroll/data/scroll_all@2x.png b/src/plugins/AutoScroll/data/scroll_all@2x.png new file mode 100644 index 000000000..237c7badc Binary files /dev/null and b/src/plugins/AutoScroll/data/scroll_all@2x.png differ diff --git a/src/plugins/AutoScroll/data/scroll_horizontal.png b/src/plugins/AutoScroll/data/scroll_horizontal.png index eaabb9e52..fe1eae3bf 100644 Binary files a/src/plugins/AutoScroll/data/scroll_horizontal.png and b/src/plugins/AutoScroll/data/scroll_horizontal.png differ diff --git a/src/plugins/AutoScroll/data/scroll_horizontal@2x.png b/src/plugins/AutoScroll/data/scroll_horizontal@2x.png new file mode 100644 index 000000000..fb9f22b1c Binary files /dev/null and b/src/plugins/AutoScroll/data/scroll_horizontal@2x.png differ diff --git a/src/plugins/AutoScroll/data/scroll_vertical.png b/src/plugins/AutoScroll/data/scroll_vertical.png index a8582dd9d..18507b3dc 100644 Binary files a/src/plugins/AutoScroll/data/scroll_vertical.png and b/src/plugins/AutoScroll/data/scroll_vertical.png differ diff --git a/src/plugins/AutoScroll/data/scroll_vertical@2x.png b/src/plugins/AutoScroll/data/scroll_vertical@2x.png new file mode 100644 index 000000000..2b2521542 Binary files /dev/null and b/src/plugins/AutoScroll/data/scroll_vertical@2x.png differ