我创建了一个GtkPopoverMenu
,并为其添加了一些文本按钮,但是我无法使用与其他popovers相同的填充,例如Nautilus中的那个。
正在应用默认样式类,GtkInspector
显示与Nautilus中的popover相同的填充值,但在视觉上,填充不在那里。
以下是代码的相关部分:
pbox = Gtk.Box(orientation = Gtk.Orientation.VERTICAL)
popover.add(pbox)
one = Gtk.ModelButton.new()
one.set_label("Button One")
pbox.pack_start(one, False, False, 0)
two = Gtk.ModelButton.new()
two.set_label("Button Two")
pbox.pack_start(two, False, False, 0)
three = Gtk.ModelButton.new()
three.set_label("Button Three")
pbox.pack_start(three, False, False, 0)
它看起来与Nautilus中的一个看起来如何:Image
完整代码:Code
我在这里错过了什么吗?