[gtk+] testscale: add a test for up/leftwards scales



commit 099dff1085e76e6e1aca9b986c0e11f6984d270b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Jun 12 09:54:33 2012 -0400

    testscale: add a test for up/leftwards scales

 tests/testscale.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tests/testscale.c b/tests/testscale.c
index 0ac8252..1401731 100755
--- a/tests/testscale.c
+++ b/tests/testscale.c
@@ -151,6 +151,16 @@ int main (int argc, char *argv[])
   gtk_container_add (GTK_CONTAINER (frame), scale);
   gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0);
 
+  frame = gtk_frame_new ("Simple marks up");
+  scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, 0, 100, 1);
+  scales = g_slist_prepend (scales, scale);
+  gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
+  gtk_scale_add_mark (GTK_SCALE (scale), marks[0], GTK_POS_TOP, NULL);
+  gtk_scale_add_mark (GTK_SCALE (scale), marks[1], GTK_POS_TOP, NULL);
+  gtk_scale_add_mark (GTK_SCALE (scale), marks[2], GTK_POS_TOP, NULL);
+  gtk_container_add (GTK_CONTAINER (frame), scale);
+  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0);
+
   frame = gtk_frame_new ("Labeled marks");
   box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]