【发布时间】:2017-02-18 13:20:42
【问题描述】:
我有这个带有 Gtk 3 的超级简单 Vala 应用程序,它显示一个带有标题栏的基本窗口,仅此而已。
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 是通过 homebrew 安装的(安装版本 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 资产?
【问题讨论】: