[gtk/ebassi/gidocgen: 106/501] docs: Split images for check and radio buttons
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/gidocgen: 106/501] docs: Split images for check and radio buttons
- Date: Fri, 5 Mar 2021 15:53:29 +0000 (UTC)
commit 7d7f5da33e02699e5cae2d323673d62b82ed8672
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 21 13:02:08 2021 -0500
docs: Split images for check and radio buttons
Its the same widget, but two images fit better in the gallery,
and will be easier to use as example images in the docs.
docs/reference/gtk/gtk4.toml.in | 1 +
docs/reference/gtk/images/check-button.png | Bin 5869 -> 3241 bytes
docs/reference/gtk/images/radio-button.png | Bin 0 -> 3667 bytes
docs/reference/gtk/visual_index.md | 1 +
docs/tools/widgets.c | 20 +++++++++++++++++---
5 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4.toml.in b/docs/reference/gtk/gtk4.toml.in
index b19c040a5d..a7bf658176 100644
--- a/docs/reference/gtk/gtk4.toml.in
+++ b/docs/reference/gtk/gtk4.toml.in
@@ -193,6 +193,7 @@ content_images = [
"images/popover.png",
"images/printdialog.png",
"images/progressbar.png",
+ "images/radio-button.png",
"images/right-center.png",
"images/right-end.png",
"images/right-start.png",
diff --git a/docs/reference/gtk/images/check-button.png b/docs/reference/gtk/images/check-button.png
index c40252fcb5..5206587fe5 100644
Binary files a/docs/reference/gtk/images/check-button.png and b/docs/reference/gtk/images/check-button.png
differ
diff --git a/docs/reference/gtk/images/radio-button.png b/docs/reference/gtk/images/radio-button.png
new file mode 100644
index 0000000000..065ccda6e6
Binary files /dev/null and b/docs/reference/gtk/images/radio-button.png differ
diff --git a/docs/reference/gtk/visual_index.md b/docs/reference/gtk/visual_index.md
index 2e5b91b172..1de772cccc 100644
--- a/docs/reference/gtk/visual_index.md
+++ b/docs/reference/gtk/visual_index.md
@@ -25,6 +25,7 @@ Title: Widget Gallery
[![togglebutton](toggle-button.png)](class.ToggleButton.html)
[![linkbutton](link-button.png)](class.LinkButton.html)
[![checkbutton](check-button.png)](class.CheckButton.html)
+[![checkbutton](radio-button.png)](class.CheckButton.html)
[![menubutton](menu-button.png)](class.MenuButton.html)
[![lockbutton](lockbutton.png)](class.LockButton.html)
[![volumebutton](volumebutton.png)](class.VolumeButton.html)
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index ca00f5e101..de0ddca882 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -140,7 +140,6 @@ create_check_button (void)
{
GtkWidget *widget;
GtkWidget *button;
- GtkWidget *group;
widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
@@ -153,6 +152,20 @@ create_check_button (void)
button = gtk_check_button_new_with_mnemonic ("_Check Button");
gtk_box_append (GTK_BOX (widget), button);
+ return new_widget_info ("check-button", widget, SMALL);
+}
+
+static WidgetInfo *
+create_radio_button (void)
+{
+ GtkWidget *widget;
+ GtkWidget *button;
+ GtkWidget *group;
+
+ widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+ gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+
button = gtk_check_button_new_with_mnemonic ("Radio Button");
gtk_check_button_set_active (GTK_CHECK_BUTTON (button), TRUE);
gtk_box_append (GTK_BOX (widget), button);
@@ -162,7 +175,7 @@ create_check_button (void)
gtk_box_append (GTK_BOX (widget), button);
gtk_check_button_set_group (GTK_CHECK_BUTTON (button), GTK_CHECK_BUTTON (group));
- return new_widget_info ("check-button", widget, MEDIUM);
+ return new_widget_info ("radio-button", widget, SMALL);
}
static WidgetInfo *
@@ -174,7 +187,7 @@ create_link_button (void)
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
- return new_widget_info ("link-button", widget, SMALL);
+ return new_widget_info ("link-button", widget, MEDIUM);
}
static WidgetInfo *
@@ -2102,6 +2115,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_about_dialog ());
retval = g_list_prepend (retval, create_button ());
retval = g_list_prepend (retval, create_check_button ());
+ retval = g_list_prepend (retval, create_radio_button ());
retval = g_list_prepend (retval, create_color_button ());
retval = g_list_prepend (retval, create_combo_box ());
retval = g_list_prepend (retval, create_combo_box_entry ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]