[gtk/modern-doc-shooter: 4/8] docs: Improve the gallery image for scales
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/modern-doc-shooter: 4/8] docs: Improve the gallery image for scales
- Date: Tue, 4 Aug 2020 04:40:30 +0000 (UTC)
commit 1492e8cf0e556d6d44b7c4b95946d388fba1e834
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Aug 4 00:00:47 2020 -0400
docs: Improve the gallery image for scales
docs/reference/gtk/images/scales.png | Bin 6251 -> 5799 bytes
docs/tools/widgets.c | 17 +++++++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/docs/reference/gtk/images/scales.png b/docs/reference/gtk/images/scales.png
index c27145ba37..96799620c4 100644
Binary files a/docs/reference/gtk/images/scales.png and b/docs/reference/gtk/images/scales.png differ
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index f519c16c3f..de783745a9 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -987,16 +987,21 @@ create_scales (void)
{
GtkWidget *hbox;
GtkWidget *vbox;
+ GtkWidget *widget;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
- gtk_box_append (GTK_BOX (hbox),
- gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,
- 0.0, 100.0, 1.0));
- gtk_box_append (GTK_BOX (hbox),
- gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
- 0.0, 100.0, 1.0));
+ widget = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, 0.0, 100.0, 1.0);
+ gtk_scale_set_draw_value (GTK_SCALE (widget), FALSE);
+ gtk_range_set_value (GTK_RANGE (widget), 50.);
+ gtk_widget_set_size_request (widget, 100, -1);
+ gtk_box_append (GTK_BOX (hbox), widget);
+ widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, 0.0, 100.0, 1.0);
+ gtk_scale_set_draw_value (GTK_SCALE (widget), FALSE);
+ gtk_widget_set_size_request (widget, -1, 100);
+ gtk_range_set_value (GTK_RANGE (widget), 50.);
+ gtk_box_append (GTK_BOX (hbox), widget);
gtk_box_append (GTK_BOX (vbox), hbox);
gtk_box_append (GTK_BOX (vbox),
g_object_new (GTK_TYPE_LABEL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]