-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglossy-test.red
56 lines (52 loc) · 1.31 KB
/
glossy-test.red
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Red [
title: "Glossy stylesheet test"
author: @hiiamboris
license: BSD-3
]
#include %../everything.red
#process off ;@@ hack to avoid #include bugs
do/expand [#include %../stylesheets/glossy.red]
#process on
view/flags [
title "Glossy stylesheet test"
host 700x400 [
column [
hlist [
vlist [
button "OK" hint= "Hint OK"
button "Cancel" hint= "Hint Cancel"
hlist tight [switch state= on text "Option 1"]
hlist tight [switch state= off text "Option 2"]
field "Entry field" focus
]
cell color= opaque black 50% [
vlist [
box [text white "Grid"]
grid spacing= 10x10 bounds= 2x2 widths= #[default 70] [
text "Cell 1x1" text "Cell 2x1" return
text "Cell 1x2" text "Cell 2x2"
]
]
]
cell color= opaque black 50% [
vlist [
box [text white "Grid-view"]
grid-view 180x130 with [
grid/widths: #[default 70]
grid/pinned: 0x1
]
source= map-each/only y 10 [map-each x 2 [rejoin ["Data " x thru y]]]
]
]
]
column tight weight= 1 [ ;@@ make row/col weight=1 by default?
box [text white "List-view"]
list-view source= read %.
]
]
] react [
face/size: face/parent/size - 20
invalidate-tree face
]
; on-over [probe hittest face/space event/offset]
] 'resize