forked from gerito1/vala-gtk-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
separator.vala
41 lines (32 loc) · 968 Bytes
/
separator.vala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* The Separator is a sparsely used widget to visually separate content being
* displayed. They can be horizontally or vertically oriented.
*/
using Gtk;
public class Example : Window
{
public Example()
{
this.title = "Separator";
this.set_default_size(400, 200);
this.destroy.connect(Gtk.main_quit);
var grid = new Grid();
this.add(grid);
var hseparator = new Separator(Gtk.Orientation.HORIZONTAL);
hseparator.set_vexpand(true);
hseparator.set_hexpand(true);
grid.attach(hseparator, 0, 0, 1, 1);
var vseparator = new Separator(Gtk.Orientation.VERTICAL);
vseparator.set_vexpand(true);
vseparator.set_hexpand(true);
grid.attach(vseparator, 1, 0, 1, 1);
}
public static int main(string[] args)
{
Gtk.init(ref args);
var window = new Example();
window.show_all();
Gtk.main();
return 0;
}
}