]> Pileus Git - ~andy/gtk/commitdiff
testscale: add a test for up/leftwards scales
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 12 Jun 2012 13:54:33 +0000 (09:54 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 12 Jun 2012 13:54:33 +0000 (09:54 -0400)
tests/testscale.c

index 0ac8252bebbcba7d0cf3f14f6de426f9ce40de5b..14017316756134f5c02134eb1fb8ef1a49467bd6 100755 (executable)
@@ -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);