From f11073bc00f1f656a590daa940e7497400f273cb Mon Sep 17 00:00:00 2001 From: borgmanJeremy <46930769+borgmanJeremy@users.noreply.github.com> Date: Mon, 12 Oct 2020 08:40:35 -0500 Subject: [PATCH] fixing icon regression (#1051) * fixing icon regression * fixed symlink --- data/graphics.qrc | 2 ++ data/img/app/flameshot.png | 1 + data/img/app/flameshot.svg | 1 + data/img/hicolor/128x128/apps/flameshot.png | 1 + data/img/hicolor/48x48/apps/flameshot.png | 1 + data/img/hicolor/scalable/apps/flameshot.svg | 1 + src/CMakeLists.txt | 11 +++++++++++ src/config/configwindow.cpp | 2 +- src/core/controller.cpp | 6 +++--- src/tools/imgur/imguruploader.cpp | 2 +- src/tools/launcher/applauncherwidget.cpp | 2 +- src/utils/screenshotsaver.cpp | 3 +-- src/widgets/infowindow.cpp | 2 +- 13 files changed, 26 insertions(+), 9 deletions(-) create mode 120000 data/img/app/flameshot.png create mode 120000 data/img/app/flameshot.svg create mode 120000 data/img/hicolor/128x128/apps/flameshot.png create mode 120000 data/img/hicolor/48x48/apps/flameshot.png create mode 120000 data/img/hicolor/scalable/apps/flameshot.svg diff --git a/data/graphics.qrc b/data/graphics.qrc index 971b9fd5..76adcd3a 100644 --- a/data/graphics.qrc +++ b/data/graphics.qrc @@ -1,7 +1,9 @@ img/app/org.flameshot.Flameshot.svg + img/app/flameshot.svg img/app/org.flameshot.Flameshot.png + img/app/flameshot.png img/material/black/undo-variant.svg img/material/black/text.svg img/material/black/square.svg diff --git a/data/img/app/flameshot.png b/data/img/app/flameshot.png new file mode 120000 index 00000000..9639efdd --- /dev/null +++ b/data/img/app/flameshot.png @@ -0,0 +1 @@ +org.flameshot.Flameshot.png \ No newline at end of file diff --git a/data/img/app/flameshot.svg b/data/img/app/flameshot.svg new file mode 120000 index 00000000..44f59631 --- /dev/null +++ b/data/img/app/flameshot.svg @@ -0,0 +1 @@ +org.flameshot.Flameshot.svg \ No newline at end of file diff --git a/data/img/hicolor/128x128/apps/flameshot.png b/data/img/hicolor/128x128/apps/flameshot.png new file mode 120000 index 00000000..9639efdd --- /dev/null +++ b/data/img/hicolor/128x128/apps/flameshot.png @@ -0,0 +1 @@ +org.flameshot.Flameshot.png \ No newline at end of file diff --git a/data/img/hicolor/48x48/apps/flameshot.png b/data/img/hicolor/48x48/apps/flameshot.png new file mode 120000 index 00000000..9639efdd --- /dev/null +++ b/data/img/hicolor/48x48/apps/flameshot.png @@ -0,0 +1 @@ +org.flameshot.Flameshot.png \ No newline at end of file diff --git a/data/img/hicolor/scalable/apps/flameshot.svg b/data/img/hicolor/scalable/apps/flameshot.svg new file mode 120000 index 00000000..44f59631 --- /dev/null +++ b/data/img/hicolor/scalable/apps/flameshot.svg @@ -0,0 +1 @@ +org.flameshot.Flameshot.svg \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8ca41c96..ba9c917a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -171,6 +171,17 @@ configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/org.flameshot.F configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/org.flameshot.Flameshot.svg ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg COPYONLY) +## Install icon with both names +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/48x48/apps/flameshot.png + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/48x48/apps/flameshot.png COPYONLY) + +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/flameshot.png + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/128x128/apps/flameshot.png COPYONLY) + +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/flameshot.svg + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/flameshot.svg COPYONLY) + + # Install assets install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/share/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}) diff --git a/src/config/configwindow.cpp b/src/config/configwindow.cpp index ccd10714..737c6573 100644 --- a/src/config/configwindow.cpp +++ b/src/config/configwindow.cpp @@ -39,7 +39,7 @@ ConfigWindow::ConfigWindow(QWidget* parent) setAttribute(Qt::WA_DeleteOnClose); const int size = GlobalValues::buttonBaseSize() * 12; setMinimumSize(size, size); - setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); + setWindowIcon(QIcon(":img/app/flameshot.svg")); setWindowTitle(tr("Configuration")); auto changedSlot = [this](QString s) { diff --git a/src/core/controller.cpp b/src/core/controller.cpp index 2f341694..b0cf0b3d 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -224,8 +224,8 @@ void Controller::enableTrayIcon() m_trayIcon = new QSystemTrayIcon(); m_trayIcon->setToolTip(QStringLiteral("Flameshot")); m_trayIcon->setContextMenu(trayIconMenu); - QIcon trayicon = QIcon::fromTheme( - "flameshot-tray", QIcon(":img/app/org.flameshot.Flameshot.png")); + QIcon trayicon = + QIcon::fromTheme("flameshot-tray", QIcon(":img/app/flameshot.png")); m_trayIcon->setIcon(trayicon); auto trayIconActivated = [this](QSystemTrayIcon::ActivationReason r) { @@ -260,7 +260,7 @@ void Controller::sendTrayNotification(const QString& text, { if (m_trayIcon) { m_trayIcon->showMessage( - title, text, QIcon(":img/app/org.flameshot.Flameshot.svg"), timeout); + title, text, QIcon(":img/app/flameshot.svg"), timeout); } } diff --git a/src/tools/imgur/imguruploader.cpp b/src/tools/imgur/imguruploader.cpp index a457c1c3..26e3f149 100644 --- a/src/tools/imgur/imguruploader.cpp +++ b/src/tools/imgur/imguruploader.cpp @@ -50,7 +50,7 @@ ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent) , m_pixmap(capture) { setWindowTitle(tr("Upload to Imgur")); - setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); + setWindowIcon(QIcon(":img/app/flameshot.svg")); #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) QRect position = frameGeometry(); diff --git a/src/tools/launcher/applauncherwidget.cpp b/src/tools/launcher/applauncherwidget.cpp index 1ca1dc50..4ae24175 100644 --- a/src/tools/launcher/applauncherwidget.cpp +++ b/src/tools/launcher/applauncherwidget.cpp @@ -52,7 +52,7 @@ AppLauncherWidget::AppLauncherWidget(const QPixmap& p, QWidget* parent) , m_pixmap(p) { setAttribute(Qt::WA_DeleteOnClose); - setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); + setWindowIcon(QIcon(":img/app/flameshot.svg")); setWindowTitle(tr("Open With")); m_keepOpen = ConfigHandler().keepOpenAppLauncherValue(); diff --git a/src/utils/screenshotsaver.cpp b/src/utils/screenshotsaver.cpp index 40363042..fd5c433d 100644 --- a/src/utils/screenshotsaver.cpp +++ b/src/utils/screenshotsaver.cpp @@ -108,8 +108,7 @@ bool ScreenshotSaver::saveToFilesystemGUI(const QPixmap& capture) QString msg = QObject::tr("Error trying to save as ") + savePath; QMessageBox saveErrBox( QMessageBox::Warning, QObject::tr("Save Error"), msg); - saveErrBox.setWindowIcon( - QIcon(":img/app/org.flameshot.Flameshot.svg")); + saveErrBox.setWindowIcon(QIcon(":img/app/flameshot.svg")); saveErrBox.exec(); } } diff --git a/src/widgets/infowindow.cpp b/src/widgets/infowindow.cpp index 23bc8c8d..b624adfa 100644 --- a/src/widgets/infowindow.cpp +++ b/src/widgets/infowindow.cpp @@ -36,7 +36,7 @@ InfoWindow::InfoWindow(QWidget* parent) : QWidget(parent) { setAttribute(Qt::WA_DeleteOnClose); - setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); + setWindowIcon(QIcon(":img/app/flameshot.svg")); setWindowTitle(tr("About")); #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))