在不知道大小的情况下寻找图标
Looking for an icon without knowing the size
我正在尝试调用 gtk_icon_theme_lookup_icon(),但问题是此时图标的大小未知。
是否可以用类似 "size = -1;" 的方式调用此函数?
否;来自 documentation of gtk_icon_info_load_icon()
:
Renders an icon previously looked up in an icon theme using gtk_icon_theme_lookup_icon()
; the size will be based on the size passed to gtk_icon_theme_lookup_icon()
.
所以,等你知道了大小时再去查一下图标;也许就在你将它渲染成 pixbuf 之前。
我正在尝试调用 gtk_icon_theme_lookup_icon(),但问题是此时图标的大小未知。
是否可以用类似 "size = -1;" 的方式调用此函数?
否;来自 documentation of gtk_icon_info_load_icon()
:
Renders an icon previously looked up in an icon theme using
gtk_icon_theme_lookup_icon()
; the size will be based on the size passed togtk_icon_theme_lookup_icon()
.
所以,等你知道了大小时再去查一下图标;也许就在你将它渲染成 pixbuf 之前。