Eclipse 应用程序图标在 Unity 的破折号中很大

Mar*_*cus 34 icons unity unity-dash

我在手动安装 Eclipse Juno 时遇到问题。将 tarball 解压缩到 后/opt,添加一个符号链接/usr/local/bin并将以下内容添加到新文件中/usr/share/applications/eclipse.desktop

[Desktop Entry]
Version=1.0
Name=Eclipse
GenericName=Integrated Development Application
Comment=Eclipse Juno
Exec=/usr/local/bin/eclipse
TryExec=/usr/local/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Development;IDE;
Run Code Online (Sandbox Code Playgroud)

我仍然从破折号中得到这种奇怪的行为:

Unity dash 中的巨大图标

Eclipse 运行得很好,图标是可点击的,但正如您所见,尺寸有点小。我怎样才能解决这个问题?Unity 不应该自动缩放图标吗?

Ant*_*ane 26

  • 在您的共享文件夹中创建一个指向 ecplise icon.xpm 的链接:

ln -s /opt/eclipse/icon.xpm ~/.local/share/icons/eclipse4.xpm

仅供您的用户使用或

须藤 ln -s /opt/eclipse/icon.xpm /usr/share/icons/eclipse4.xpm

对于所有用户

  • 在您的eclipse.desktop文件(在~/.local/share/applications/usr/share/applications)中,将Icon=/opt/eclipse/icon.xpm 替换Icon=eclipse4。您不需要添加.xpm后缀。

如有必要,还可以Icon[en_US]使用相同的值更新行。

该文件eclipse.desktop可能具有不同的名称,具体取决于您用于创建它的工具。

编辑:感谢 Pius, QD 改进答案。和 iAm 评论


小智 11

@Tawane 我将符号链接添加到 ~/.local/share/icons/ 中,这可能使它更容易:

ln -s /opt/eclipse/icon.xpm ~/.local/share/icons/eclipse.xpm
Run Code Online (Sandbox Code Playgroud)


小智 10

this may help you...

在此处输入图片说明

you can save image and change icon to this.

I scaled image icon.xpm size to 48 x 48 pixel which is in eclipse application

It looks well:

在此处输入图片说明


48x48 may look a little blurry on higher (or even medium) resolution. You may use 512x512 (even though it's a little bit an overkill) to ensure your system resizes it to whatever is used. PNGs are resized properly, so you can always supply it with a bigger image than actually displayed.

512x512 icon version can be found here: Eclipse icon

The image is taken from Eclipse help page: Eclipse help page


Axe*_*xel -1

eclipse目录(eclipse.xpm)中的图标大小为256x256。将其替换为较小的(48x48 对我来说适用)。

  • 我相信这是从 Ubuntu 12.10 开始的,在 12.10 xpm 图标被正确调整大小之前。 (2认同)