[gtk/wip/baedert/for-master: 24/29] fontrendering demo: Stop using radio buttons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 24/29] fontrendering demo: Stop using radio buttons
- Date: Mon, 31 Aug 2020 02:26:57 +0000 (UTC)
commit f085ac837c1c5526fb4c6bdf1517af31ceaf5d85
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Aug 30 21:50:45 2020 -0400
fontrendering demo: Stop using radio buttons
Replace them with grouped toggled buttons.
demos/gtk-demo/fontrendering.c | 2 +-
demos/gtk-demo/fontrendering.ui | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/demos/gtk-demo/fontrendering.c b/demos/gtk-demo/fontrendering.c
index cc1d9033bb..fc6fb1b1ee 100644
--- a/demos/gtk-demo/fontrendering.c
+++ b/demos/gtk-demo/fontrendering.c
@@ -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);
diff --git a/demos/gtk-demo/fontrendering.ui b/demos/gtk-demo/fontrendering.ui
index b3606c5399..363f6f5e3d 100644
--- a/demos/gtk-demo/fontrendering.ui
+++ b/demos/gtk-demo/fontrendering.ui
@@ -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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]