fontrendering demo: Stop using radio buttons

Replace them with grouped toggled buttons.
This commit is contained in:
Matthias Clasen 2020-08-30 21:50:45 -04:00
parent 28d7f497ef
commit f085ac837c
2 changed files with 4 additions and 3 deletions

View File

@ -69,7 +69,7 @@ update_image (void)
cairo_font_options_destroy (fopt);
pango_context_changed (context);
if (gtk_check_button_get_active (GTK_CHECK_BUTTON (text_radio)))
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (text_radio)))
{
layout = pango_layout_new (context);
pango_layout_set_font_description (layout, desc);

View File

@ -18,12 +18,13 @@
<class name="linked"/>
</style>
<child>
<object class="GtkRadioButton" id="text_radio">
<object class="GtkToggleButton" id="text_radio">
<property name="label">Text</property>
<property name="active">1</property>
</object>
</child>
<child>
<object class="GtkRadioButton" id="grid_radio">
<object class="GtkToggleButton" id="grid_radio">
<property name="label">Grid</property>
<property name="group">text_radio</property>
</object>