gpt4 book ai didi

objective-c - NSToolbarItem 图像缩放

转载 作者:搜寻专家 更新时间:2023-10-30 19:54:39 25 4
gpt4 key购买 nike

为什么会这样:

如您所见,在“允许的工具栏项目”中,“PHP”工具栏项目的图像看起来不错,但当它实际位于工具栏中时,它会奇怪地缩放。

谢谢

最佳答案

在文档中找到这个:

The displayed resolution of an image item is dependent on the sizeMode of the toolbar. You should provide image representations specific to the default, regular and small size modes in a single image that supports multiple image representations such as icns or tiff. The appropriate image representation is automatically displayed for the toolbar's current sizeMode. If an appropriate representation is not available, the toolbar scales the representation to the appropriate size for the current mode, at a cost in performance and appearance. Images that are not square are scaled to fit. An image item’s image is also scaled down and used in the image item’s overflow menu item. (Emphasis added)

看来您可能想尝试摆弄 NSToolbarItemminSizemaxSize 属性。

关于objective-c - NSToolbarItem 图像缩放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1583064/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com