我正在使用Gtk.Builder()来构建AppIndicator的菜单。目标是让一个MenuItem里面有两个标签(一个在左边,一个在右边),但由于某种原因,第二个标签被忽略,只有第一个标签被正确渲染。我很确定它是可能的,因为Gnome文档说明了这一点,而Ubuntu上的DateTime小部件中有相同类型的MenuItem。
<interface>
<requires lib="gtk+" version="3.12"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkMenu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkMenuItem">
<property name="visible">True</property>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Label 1</property>
<property name="use_underline">True</property>
<property name="halign">start</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Label 2</property>
<property name="use_underline">True</property>
<property name="halign">end</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
我错过了什么吗?