macOS 上的 Vala 中没有默认图标
No default icons in Vala on macOS
我有这个超级简单的 Vala with Gtk 3 应用程序,它显示了一个带有 header 栏的基本 window,仅此而已。
int main(string[] args) {
Gtk.init(ref args);
var header = new Gtk.HeaderBar();
header.set_show_close_button(true);
header.title = "Hello";
var window = new Gtk.Window();
window.set_titlebar(header);
window.destroy.connect(Gtk.main_quit);
window.show_all();
Gtk.main();
return 0;
}
它是在带有 valac --pkg gtk+-3.0 hello.vala
的 macOS 10.11.6 机器上编译的,Vala 是通过自制软件安装的(安装了 0.34.4 版)。该应用程序可以运行,但缺少最小化、最大化和关闭图标图像。
同样的问题,当我 运行 它附带的任何应用程序时 gtk3-icon-browser
:工作但没有图标。
我是 Vala 的新手,所以我可能缺少一个我不知道的依赖项...或者这是一个错误?
当我运行应用程序时,终端发出以下警告,编译时没有警告。
hello[10331:362029] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
(hello:10331): Gdk-WARNING **: GdkQuartzDisplay does not implement the monitor vfuncs
据我所知,警告似乎并不相关。这是 Retina MBP,也许 2x 资产丢失了?
我建议通过我开发的 officially supported method or using these custom JHBuild modules 安装 GTK。这两种方法都将构建和安装 adwaita-icon-theme
模块,该模块为 GTK 提供图标。
您也可以在现有设置中通过 Homebrew 构建此模块,但我不确定。
我有这个超级简单的 Vala with Gtk 3 应用程序,它显示了一个带有 header 栏的基本 window,仅此而已。
int main(string[] args) {
Gtk.init(ref args);
var header = new Gtk.HeaderBar();
header.set_show_close_button(true);
header.title = "Hello";
var window = new Gtk.Window();
window.set_titlebar(header);
window.destroy.connect(Gtk.main_quit);
window.show_all();
Gtk.main();
return 0;
}
它是在带有 valac --pkg gtk+-3.0 hello.vala
的 macOS 10.11.6 机器上编译的,Vala 是通过自制软件安装的(安装了 0.34.4 版)。该应用程序可以运行,但缺少最小化、最大化和关闭图标图像。
同样的问题,当我 运行 它附带的任何应用程序时 gtk3-icon-browser
:工作但没有图标。
我是 Vala 的新手,所以我可能缺少一个我不知道的依赖项...或者这是一个错误?
当我运行应用程序时,终端发出以下警告,编译时没有警告。
hello[10331:362029] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
(hello:10331): Gdk-WARNING **: GdkQuartzDisplay does not implement the monitor vfuncs
据我所知,警告似乎并不相关。这是 Retina MBP,也许 2x 资产丢失了?
我建议通过我开发的 officially supported method or using these custom JHBuild modules 安装 GTK。这两种方法都将构建和安装 adwaita-icon-theme
模块,该模块为 GTK 提供图标。
您也可以在现有设置中通过 Homebrew 构建此模块,但我不确定。