0
|
1 widget WindowFrame {
|
|
2 layout = VBox;
|
|
3 shape = Rectangle;
|
|
4 style.normal = {
|
|
5 border = 1 black;
|
|
6 }
|
|
7
|
|
8 [hexpand hfill] new HBox handle {
|
|
9 size = 0 23;
|
|
10 shape = Rectangle;
|
|
11 layout = {
|
|
12 padding = 5 0;
|
|
13 spacing = 4;
|
|
14 }
|
|
15
|
|
16 style.normal = {
|
|
17 border = 1 black;
|
|
18 background = solid(rgb(.6, .6, .6));
|
|
19 image = grid("themes/default/img/winframe_bg.png", hline(1, 9), vline(0, 23));
|
|
20 }
|
|
21 style.active = {
|
|
22 background = solid(white);
|
|
23 }
|
|
24
|
|
25 [hexpand vexpand] new Label caption {
|
|
26 }
|
|
27
|
|
28 [vexpand] new WindowFrameButton minimizeButton {
|
|
29 addIcon = "themes/default/img/winframe_minimize.png";
|
|
30 }
|
|
31 [vexpand] new WindowFrameButton maximizeButton {
|
|
32 addIcon = "themes/default/img/winframe_maximize.png";
|
|
33 addIcon = "themes/default/img/winframe_restore.png";
|
|
34 }
|
|
35 [vexpand] new WindowFrameButton closeButton {
|
|
36 addIcon = "themes/default/img/winframe_close.png";
|
|
37 }
|
|
38 }
|
|
39
|
|
40 [hexpand hfill vexpand vfill] new VBox clientArea {
|
|
41 }
|
|
42
|
|
43 children = sub(clientArea);
|
|
44 handle = sub(handle);
|
|
45
|
|
46 minimizeClicked = prop(handle.minimizeButton.clicked);
|
|
47 maximizeClicked = prop(handle.maximizeButton.clicked);
|
|
48 closeClicked = prop(handle.closeButton.clicked);
|
|
49 text = prop(handle.caption.text);
|
|
50 }
|