- fix app icons in linux

This commit is contained in:
Dmytro Bogovych 2022-07-20 21:43:10 +02:00
parent e5a5aa5680
commit cc997eb404
8 changed files with 8 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -59,7 +59,11 @@
<file>assets/images/buttons/tree-add-root-small.png</file> <file>assets/images/buttons/tree-add-root-small.png</file>
<file>assets/images/buttons/tree-add-root.png</file> <file>assets/images/buttons/tree-add-root.png</file>
<file>assets/images/buttons/tree-add-sibling-small.png</file> <file>assets/images/buttons/tree-add-sibling-small.png</file>
<file>assets/images/app_icon/linux/noo_16x16.png</file>
<file>assets/images/app_icon/linux/noo_32x32.png</file>
<file>assets/images/app_icon/linux/noo_64x64.png</file>
<file>assets/images/app_icon/linux/noo_128x128.png</file> <file>assets/images/app_icon/linux/noo_128x128.png</file>
<file>assets/images/app_icon/linux/noo_256x256.png</file>
<file>assets/misc/noo.desktop</file> <file>assets/misc/noo.desktop</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -110,7 +110,7 @@ void appmenu::install(const std::string& path_to_me)
// Install latest icons // Install latest icons
{ {
auto icons = {"16x16", "32x32", "64x64", "128x128", "512x512"}; auto icons = {"16x16", "32x32", "64x64", "128x128", "256x256"};
// Here Qt part // Here Qt part
auto target_dir = QFileInfo(QDir::homePath() + "/.local/share/icons/hicolor").absoluteFilePath(); auto target_dir = QFileInfo(QDir::homePath() + "/.local/share/icons/hicolor").absoluteFilePath();
@ -119,9 +119,10 @@ void appmenu::install(const std::string& path_to_me)
// Copy icons from resources // Copy icons from resources
for (auto& icon_suffix: icons) for (auto& icon_suffix: icons)
{ {
QString icon_src = QString(":/assets/images/app_icon/icon_") + icon_suffix + ".png", QString icon_src = QString(":/assets/images/app_icon/linux/noo_") + icon_suffix + ".png",
icon_dst = target_dir + "/" + icon_suffix + "/apps/noo.png"; icon_dst = target_dir + "/" + icon_suffix + "/apps/noo.png";
QFile::copy(icon_src, icon_dst); if (QFile::exists(icon_src))
QFile::copy(icon_src, icon_dst);
} }
} }
} }