简体   繁体   English

.desktop文件与自定义图标

[英].desktop files with custom icons

I created an app and custom icon for it. 我为此创建了一个应用程序和自定义图标。 I succesfully installed and stuff and when I add a path to the Icon path into the .dekstop file like this: 我成功安装了东西,当我将图标路径添加到.dekstop文件中时,如下所示:

Icon=/usr/share/icons/hicolor/64x64/resize.svg

it works fine but with Icon=resize it does not. 它工作正常,但使用Icon=resize则不能。 My app icon is just the default one. 我的应用程序图标只是默认图标。

I installed the icons with the following command in the cmakelists.txt and I checked the icons too, they are copied so everything should be fine. 我在cmakelists.txt中使用以下命令安装了图标,并且我也检查了图标,它们已被复制,因此一切都应该没问题。 What do I miss? 我想念什么?

install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/16/resize.svg DESTINATION share/icons/hicolor/16x16/apps)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/24/resize.svg DESTINATION share/icons/hicolor/24x24/apps)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/32/resize.svg DESTINATION share/icons/hicolor/32x32/apps)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/48/resize.svg DESTINATION share/icons/hicolor/48x48/apps)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/64/resize.svg DESTINATION share/icons/hicolor/64x64/apps)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/128/resize.svg DESTINATION share/icons/hicolor/128x128/apps)

As I understand from the documentation I read on the subject Icon=resize should work fine. 据我从文档中了解到,我阅读的主题Icon=resize应该可以正常工作。

Apparently it does not work in your case. 显然,这不适用于您的情况。 (Maybe you should ask someone from you Linux distribution in a bug report or on a mailing list). (也许您应该在错误报告或邮件列表中询问Linux发行版中的某个人)。

Icon=resize.svg is more specific. Icon=resize.svg更具体。 (See comments on the question) (请参阅有关问题的评论)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM