No issues found
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2
3 #include <config.h>
4
5 #include <gtk/gtk.h>
6
7 #include <eel/eel-editable-label.h>
8
9
10 static void
11 quit (GtkWidget *widget, gpointer data)
12 {
13 gtk_main_quit ();
14 }
15
16 int
17 main (int argc, char* argv[])
18 {
19 GtkWidget *window;
20 GtkWidget *label;
21 GtkWidget *vbox;
22
23 gtk_init (&argc, &argv);
24
25 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
26 g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit), NULL);
27
28 vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
29
30 gtk_container_add (GTK_CONTAINER (window), vbox);
31
32 label = eel_editable_label_new ("Centered dsau dsfgsdfgoydsfiugy oiusdyfg iouysdf goiuys dfioguy siodufgy iusdyfgiu ydsf giusydf gouiysdfgoiuysdfg oiudyfsg Label");
33
34 gtk_widget_set_size_request (label, 200, -1);
35 eel_editable_label_set_line_wrap (EEL_EDITABLE_LABEL (label), TRUE);
36
37 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
38
39 label = eel_editable_label_new ("Left aligned label");
40
41 gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
42
43 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
44
45 label = eel_editable_label_new ("Right aligned label");
46
47 gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
48
49 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
50
51 gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
52
53 gtk_widget_show_all (window);
54
55 gtk_main ();
56
57 return 0;
58 }