GtkPopover Cannot Be Used As Templates
Steps to reproduce
- Create a template with
parent="GtkPopover"
. Reproducer below. - Hook up the template as the popover on a menubutton.
- Observe that the menubutton has an empty popover.
There will be no criticals in the logs suggesting an issue.
Current behavior
The popover is blank, with the GtkGizmo
having no children.
Expected outcome
The GtkGizmo
should have the children established in the UI file.
Version information
GTK 4.0.2-41-g4d609149 from the flatpak nightly SDK
Additional information
<interface>
<template class="ColPickerColorPopover" parent="GtkPopover">
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<child>
<object class="GtkStackSwitcher">
<property name="stack">color_stack</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkStack" id="color_stack">
<child>
<object class="GtkStackPage">
<property name="name">HSV</property>
<property name="child">
<object class="GtkLabel">
<property name="label">Foo</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="name">RGB</property>
<property name="child">
<object class="GtkLabel">
<property name="label">BAR</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</property>
</template>
</interface>
If I use a plain non-template GtkPopover in the same UI file as the menubutton, the popover works correctly.
Using a template | Using a plain popover |
---|---|