HdyComboRow breaks if custom widgets are added
If custom widgets are added to HdyComboRow
, they seems to be packed at the bottom of the row as a separate widget. This makes it suitable only if we need to add title only, but not custom widgets.
Screenshot:
A minimal UI file to reproduce:
<interface>
<object class="GtkApplicationWindow" id="window">
<property name="default-width">400</property>
<property name="default-height">300</property>
<child>
<object class="GtkListBox">
<property name="visible">1</property>
<child>
<object class="HdyComboRow">
<property name="visible">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<style>
<class name="frame"/>
</style>
<child>
<object class="GtkLabel">
<property name="label">Test Label</property>
<property name="visible">1</property>
<style>
<class name="frame"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
.c
file to compile:
#define HANDY_USE_UNSTABLE_API
#include <gtk/gtk.h>
#include <handy.h>
/* gcc `pkg-config --cflags --libs libhandy-0.0` main.c */
static void
app_activate_cb (GApplication *app)
{
GtkBuilder *builder;
GtkWidget *window;
g_application_hold (app);
builder = gtk_builder_new_from_file ("./main.ui");
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
gtk_widget_show (window);
}
int
main (int argc,
char *argv[])
{
GtkApplication *app;
int status;
app = gtk_application_new (NULL, 0);
g_signal_connect (app, "activate", G_CALLBACK (app_activate_cb), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
return status;
}