Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个带有托盘图标的 Java 应用程序。我正在使用透明png图像。但是,渲染的图标在所有平台上都非常难看,包括 Windows 7 和 Linux。
png
创建托盘图标(例如格式、大小等)有什么好的做法吗?
在 Windows 中,您应该使用该.ico格式。它可能包含多个不同大小的图标。在Linux中,我猜png是标准。只是不要尝试扩展它。预先创建具有不同尺寸的同一图像的多个版本。
.ico
据我所知,这个问题没有“已知的解决方案”。您应该将透明图标切换为方形图标。您可以查看此问题以获取更深入的信息;
java TrayIcon使用具有透明背景的图像