diff --git a/app/aboutdialog.cpp b/app/aboutdialog.cpp index a5c636d..a1a0e6f 100644 --- a/app/aboutdialog.cpp +++ b/app/aboutdialog.cpp @@ -26,7 +26,7 @@ AboutDialog::AboutDialog(QWidget *parent) // blumia: Chain two arg() here since it seems lupdate will remove one of them if we use // the old `arg(QCoreApp::translate(), tr())` way, but it's worth to mention // `arg(QCoreApp::translate(), this->tr())` works, but lupdate will complain about the usage. - const QString HELP_HTML = loadEmbeddedHtml(u":/plain/help.html"_s) + const QString HELP_HTML = loadEmbeddedHtml(u":/htmls/help.html"_s) .arg(tr("General Help")) .arg(tr("Launch application with image file path as argument to load the file.")) .arg(tr("Passing in a single image file will load all the images in that directory and start viewing from that image.")) @@ -48,7 +48,7 @@ AboutDialog::AboutDialog(QWidget *parent) #endif // GIT_DESCRIBE_VERSION_STRING const QString QT_VERSION_ARG = QT_VERSION_STR; const QString QT_ARCH_ARG = QSysInfo::buildCpuArchitecture(); - const QString ABOUT_HTML = loadEmbeddedHtml(u":/plain/about.html"_s) + const QString ABOUT_HTML = loadEmbeddedHtml(u":/htmls/about.html"_s) .arg(APP_NAME_ARG) .arg(tr("Version: %1").arg(APP_VERSION_ARG)) .arg(tr("Upstream author")) @@ -57,19 +57,19 @@ AboutDialog::AboutDialog(QWidget *parent) .arg(tr("Built with Qt %1 (%2)").arg(QT_VERSION_ARG).arg(QT_ARCH_ARG)) .arg(tr("Source code")); - const QString SPECIAL_THANKS_HTML = loadEmbeddedHtml(u":/plain/special-thanks.html"_s) + const QString SPECIAL_THANKS_HTML = loadEmbeddedHtml(u":/htmls/special-thanks.html"_s) .arg(tr("Contributors")) .arg(tr("List of contributors on GitHub")) .arg(tr("Thanks to all people who contributed to this project.")) .arg(tr("Translators")) .arg(tr("I would like to thank the following people who volunteered to translate this application.")); - const QString LICENSE_HTML = loadEmbeddedHtml(u":/plain/license.html"_s) + const QString LICENSE_HTML = loadEmbeddedHtml(u":/htmls/license.html"_s) .arg(tr("License")) .arg(tr("This application is released under the MIT License.")) .arg(tr("License Verbatim Copy")); - const QString THIRD_PARTY_LIBS_HTML = loadEmbeddedHtml(u":/plain/third-party-libs.html"_s) + const QString THIRD_PARTY_LIBS_HTML = loadEmbeddedHtml(u":/htmls/third-party-libs.html"_s) .arg(tr("Third-party Libraries")) .arg(tr("This application is built on the following free software libraries.", "Free as in freedom")) .arg(tr("Some of them are optional and might not be included with this distribution depending on the build environment.")); diff --git a/app/actionmanager.cpp b/app/actionmanager.cpp index f3a2977..e05728d 100644 --- a/app/actionmanager.cpp +++ b/app/actionmanager.cpp @@ -16,11 +16,8 @@ static QIcon loadHidpiIcon(const QString &resp, QSize sz = QSize(32, 32)) { - QSvgRenderer r(resp); - QPixmap pm = QPixmap(sz * qApp->devicePixelRatio()); - pm.fill(Qt::transparent); - QPainter p(&pm); - r.render(&p); + QPixmap pm = QPixmap(resp); + pm.scaled(sz * qApp->devicePixelRatio(), Qt::KeepAspectRatio); pm.setDevicePixelRatio(qApp->devicePixelRatio()); return QIcon(pm); } @@ -32,7 +29,7 @@ void ActionManager::setupAction(MainWindow *mainWindow) // Declare some convenient macros and lambdas. #define ICON_NAME(name)\ - QStringLiteral(":/icons/" #name ".svg") + QStringLiteral(":/icons/" #name ".png") #define ACTION_NAME(s) QStringLiteral(STRIFY(s)) #define STRIFY(s) #s @@ -52,38 +49,35 @@ void ActionManager::setupAction(MainWindow *mainWindow) /// This macro for register action with our custom icon. #define CREATE_NEW_ICON_ACTION(w, a, i) create_action(w, &a, ICON_NAME(i), ACTION_NAME(a), false) - // TODO: We may replace all Qt theme icons to our custom icon for visual consistency. - // TODO: Some icons are invalid. - CREATE_NEW_ACTION(mainWindow, actionCopyPixmap); CREATE_NEW_ACTION(mainWindow, actionCopyFilePath); CREATE_NEW_ICON_ACTION(mainWindow, actionPrevPicture, go-previous); CREATE_NEW_ICON_ACTION(mainWindow, actionNextPicture, go-next); - CREATE_NEW_ICON_ACTION(mainWindow, actionActualSize, zoom-original); - CREATE_NEW_ICON_ACTION(mainWindow, actionFitToScreen, app-icon); - CREATE_NEW_ICON_ACTION(mainWindow, actionFitByWidth, app-icon); - CREATE_NEW_ICON_ACTION(mainWindow, actionFitByHeight, app-icon); + CREATE_NEW_ICON_ACTION(mainWindow, actionActualSize, fit-to-size); + CREATE_NEW_ICON_ACTION(mainWindow, actionFitToScreen, fit-to-screen); + CREATE_NEW_ACTION(mainWindow, actionFitByWidth); + CREATE_NEW_ACTION(mainWindow, actionFitByHeight); CREATE_NEW_ICON_ACTION(mainWindow, actionZoomIn, zoom-in); CREATE_NEW_ICON_ACTION(mainWindow, actionZoomOut, zoom-out); - CREATE_NEW_ICON_ACTION(mainWindow, actionFlipHorizontal, app-icon); - CREATE_NEW_ICON_ACTION(mainWindow, actionFlipVertical, app-icon); - CREATE_NEW_ICON_ACTION(mainWindow, actionRotateClockwise, object-rotate-right); - CREATE_NEW_ICON_ACTION(mainWindow, actionRotateCounterClockwise, app-icon); + CREATE_NEW_ICON_ACTION(mainWindow, actionFlipHorizontal, flip-horizontal); + CREATE_NEW_ICON_ACTION(mainWindow, actionFlipVertical, flip-vertical); + CREATE_NEW_ICON_ACTION(mainWindow, actionRotateClockwise, rotate-right); + CREATE_NEW_ICON_ACTION(mainWindow, actionRotateCounterClockwise, rotate-left); CREATE_NEW_ACTION(mainWindow, actionToggleAvoidResetTransform); CREATE_NEW_ACTION(mainWindow, actionToggleCheckerboard); CREATE_NEW_ACTION(mainWindow, actionTogglePauseAnimation); CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame); - CREATE_NEW_THEMEICON_ACTION(mainWindow, actionTrash, edit-delete); - CREATE_NEW_THEMEICON_ACTION(mainWindow, actionLocateInFileManager, system-file-manager); - CREATE_NEW_THEMEICON_ACTION(mainWindow, actionProperties, document-properties); + CREATE_NEW_ACTION(mainWindow, actionTrash/*, edit-delete*/); + CREATE_NEW_ACTION(mainWindow, actionLocateInFileManager/*, system-file-manager*/); + CREATE_NEW_ICON_ACTION(mainWindow, actionProperties, image-info); CREATE_NEW_ACTION(mainWindow, actionSettings); - CREATE_NEW_THEMEICON_ACTION(mainWindow, actionHelp, system-help); + CREATE_NEW_ACTION(mainWindow, actionHelp/*, system-help*/); // Remove convenient macros diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index 01782f7..9a8234e 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -61,7 +61,7 @@ MainWindow::MainWindow(QWidget *parent) // It is too small for modern device, // so I level it up to SVGA resolution 800 x 600. this->setMinimumSize(800, 600); - this->setWindowIcon(QIcon(u":/icons/app-icon.svg"_s)); + this->setWindowIcon(QIcon(u":/icons/app-icon.png"_s)); this->setAcceptDrops(true); // Initialize playlist manager diff --git a/app/mainwindow.ui b/app/mainwindow.ui index c17f08b..c9b03e3 100644 --- a/app/mainwindow.ui +++ b/app/mainwindow.ui @@ -139,9 +139,6 @@ &Copy - - - diff --git a/assets/embeds/app.ico b/assets/embeds/app.ico new file mode 100644 index 0000000..b2d71b3 Binary files /dev/null and b/assets/embeds/app.ico differ diff --git a/assets/embeds/bmp.ico b/assets/embeds/bmp.ico new file mode 100644 index 0000000..8b91fcc Binary files /dev/null and b/assets/embeds/bmp.ico differ diff --git a/assets/embeds/gif.ico b/assets/embeds/gif.ico new file mode 100644 index 0000000..cf8a792 Binary files /dev/null and b/assets/embeds/gif.ico differ diff --git a/assets/embeds/jpg.ico b/assets/embeds/jpg.ico new file mode 100644 index 0000000..747dd67 Binary files /dev/null and b/assets/embeds/jpg.ico differ diff --git a/assets/embeds/png.ico b/assets/embeds/png.ico new file mode 100644 index 0000000..019506d Binary files /dev/null and b/assets/embeds/png.ico differ diff --git a/assets/plain/about.html b/assets/htmls/about.html similarity index 92% rename from assets/plain/about.html rename to assets/htmls/about.html index 65dcb31..2fd1abb 100644 --- a/assets/plain/about.html +++ b/assets/htmls/about.html @@ -1,6 +1,6 @@

- +
%1 diff --git a/assets/plain/help.html b/assets/htmls/help.html similarity index 100% rename from assets/plain/help.html rename to assets/htmls/help.html diff --git a/assets/plain/license.html b/assets/htmls/license.html similarity index 100% rename from assets/plain/license.html rename to assets/htmls/license.html diff --git a/assets/plain/special-thanks.html b/assets/htmls/special-thanks.html similarity index 100% rename from assets/plain/special-thanks.html rename to assets/htmls/special-thanks.html diff --git a/assets/plain/third-party-libs.html b/assets/htmls/third-party-libs.html similarity index 100% rename from assets/plain/third-party-libs.html rename to assets/htmls/third-party-libs.html diff --git a/assets/icons/app-icon.icns b/assets/icons/app-icon.icns deleted file mode 100644 index a6c8400..0000000 Binary files a/assets/icons/app-icon.icns and /dev/null differ diff --git a/assets/icons/app-icon.ico b/assets/icons/app-icon.ico deleted file mode 100644 index 282a6ef..0000000 Binary files a/assets/icons/app-icon.ico and /dev/null differ diff --git a/assets/icons/app-icon.png b/assets/icons/app-icon.png new file mode 100644 index 0000000..8e286d3 Binary files /dev/null and b/assets/icons/app-icon.png differ diff --git a/assets/icons/app-icon.svg b/assets/icons/app-icon.svg deleted file mode 100644 index 7038792..0000000 --- a/assets/icons/app-icon.svg +++ /dev/null @@ -1,1487 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/fit-to-screen.png b/assets/icons/fit-to-screen.png new file mode 100644 index 0000000..e6cdd53 Binary files /dev/null and b/assets/icons/fit-to-screen.png differ diff --git a/assets/icons/fit-to-size.png b/assets/icons/fit-to-size.png new file mode 100644 index 0000000..536df5c Binary files /dev/null and b/assets/icons/fit-to-size.png differ diff --git a/assets/icons/flip-horizontal.png b/assets/icons/flip-horizontal.png new file mode 100644 index 0000000..c44e411 Binary files /dev/null and b/assets/icons/flip-horizontal.png differ diff --git a/assets/icons/flip-vertical.png b/assets/icons/flip-vertical.png new file mode 100644 index 0000000..1d8c18d Binary files /dev/null and b/assets/icons/flip-vertical.png differ diff --git a/assets/icons/go-next.png b/assets/icons/go-next.png new file mode 100644 index 0000000..18182a0 Binary files /dev/null and b/assets/icons/go-next.png differ diff --git a/assets/icons/go-next.svg b/assets/icons/go-next.svg deleted file mode 100644 index f769cde..0000000 --- a/assets/icons/go-next.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/icons/go-previous.png b/assets/icons/go-previous.png new file mode 100644 index 0000000..d0d709d Binary files /dev/null and b/assets/icons/go-previous.png differ diff --git a/assets/icons/go-previous.svg b/assets/icons/go-previous.svg deleted file mode 100644 index cdf3dc5..0000000 --- a/assets/icons/go-previous.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/icons/image-info.png b/assets/icons/image-info.png new file mode 100644 index 0000000..380bd6f Binary files /dev/null and b/assets/icons/image-info.png differ diff --git a/assets/icons/object-rotate-right.svg b/assets/icons/object-rotate-right.svg deleted file mode 100644 index 2aa9450..0000000 --- a/assets/icons/object-rotate-right.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/icons/rotate-left.png b/assets/icons/rotate-left.png new file mode 100644 index 0000000..4e631fd Binary files /dev/null and b/assets/icons/rotate-left.png differ diff --git a/assets/icons/rotate-right.png b/assets/icons/rotate-right.png new file mode 100644 index 0000000..4106d5d Binary files /dev/null and b/assets/icons/rotate-right.png differ diff --git a/assets/icons/view-background-checkerboard.svg b/assets/icons/view-background-checkerboard.svg deleted file mode 100644 index 4e0e4ef..0000000 --- a/assets/icons/view-background-checkerboard.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/view-fullscreen.svg b/assets/icons/view-fullscreen.svg deleted file mode 100644 index 1d25d09..0000000 --- a/assets/icons/view-fullscreen.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/window-close.svg b/assets/icons/window-close.svg deleted file mode 100644 index daca19c..0000000 --- a/assets/icons/window-close.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/assets/icons/zoom-in.png b/assets/icons/zoom-in.png new file mode 100644 index 0000000..c639049 Binary files /dev/null and b/assets/icons/zoom-in.png differ diff --git a/assets/icons/zoom-in.svg b/assets/icons/zoom-in.svg deleted file mode 100644 index 0f96eb1..0000000 --- a/assets/icons/zoom-in.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/icons/zoom-original.svg b/assets/icons/zoom-original.svg deleted file mode 100644 index 9a5e3c9..0000000 --- a/assets/icons/zoom-original.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/zoom-out.png b/assets/icons/zoom-out.png new file mode 100644 index 0000000..c1fd0ab Binary files /dev/null and b/assets/icons/zoom-out.png differ diff --git a/assets/icons/zoom-out.svg b/assets/icons/zoom-out.svg deleted file mode 100644 index d679957..0000000 --- a/assets/icons/zoom-out.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/pineapple-pictures.rc.in b/assets/pineapple-pictures.rc.in index 9215bf8..7c05358 100644 --- a/assets/pineapple-pictures.rc.in +++ b/assets/pineapple-pictures.rc.in @@ -1,4 +1,4 @@ -IDI_ICON1 ICON DISCARDABLE "@CMAKE_CURRENT_SOURCE_DIR@/assets/icons/app-icon.ico" +IDI_ICON1 ICON DISCARDABLE "@CMAKE_CURRENT_SOURCE_DIR@/assets/embeds/app.ico" 1 VERSIONINFO BEGIN BLOCK "StringFileInfo" diff --git a/assets/resources.qrc b/assets/resources.qrc index 58dc1fa..fce46d7 100644 --- a/assets/resources.qrc +++ b/assets/resources.qrc @@ -1,19 +1,23 @@ - icons/zoom-in.svg - icons/zoom-out.svg - icons/view-fullscreen.svg - icons/zoom-original.svg - icons/object-rotate-right.svg - icons/view-background-checkerboard.svg - icons/app-icon.svg - icons/window-close.svg - icons/go-next.svg - icons/go-previous.svg - plain/help.html - plain/about.html - plain/special-thanks.html - plain/license.html - plain/third-party-libs.html + + icons/app-icon.png + icons/image-info.png + icons/fit-to-screen.png + icons/fit-to-size.png + icons/zoom-in.png + icons/zoom-out.png + icons/rotate-left.png + icons/rotate-right.png + icons/go-next.png + icons/go-previous.png + icons/flip-horizontal.png + icons/flip-vertical.png + + htmls/help.html + htmls/about.html + htmls/special-thanks.html + htmls/license.html + htmls/third-party-libs.html diff --git a/assets/sarasacw-picture.icns b/assets/sarasacw-picture.icns new file mode 100644 index 0000000..63ebbd1 Binary files /dev/null and b/assets/sarasacw-picture.icns differ