-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuicolorpicker.otui
95 lines (94 loc) · 2.16 KB
/
uicolorpicker.otui
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
ColorPickerNode < UIWidget
height: 40
phantom: true
Label
id: description
anchors.left: parent.left
anchors.top: parent.top
font: verdana-11px-rounded
phantom: true
Label
id: value
anchors.left: prev.right
margin-left: 5
anchors.verticalCenter: prev.verticalCenter
font: verdana-11px-rounded
phantom: true
HorizontalScrollBar
id: slider
anchors.top: description.bottom
anchors.left: description.left
anchors.right: parent.right
margin-top: 6
step: 1
minimum: 0
maximum: 255
value: 255
show-value: true
@onValueChange: self:setText(self:getValue())
ColorPicker < UIColorPicker
border: 2 #25495A
width: 300
height: 200
padding-top: 10
image-source: /images/ui/window/windowContent
image-border: 5
image-border-top: 22
@onEscape: self:close()
@onSetup: self:initialize()
UIWidget
id: colorPreviewer
anchors.right: parent.right
anchors.top: parent.top
size: 71 71
background-color: #FFFFFF
margin-right: 10
TextEdit
id: hexcode
anchors.left: colorPreviewer.left
anchors.right: colorPreviewer.right
anchors.top: colorPreviewer.bottom
margin-top: 5
max-length: 9
cursor-visible: false
Button
id: applyHexButton
text: Use Hex
anchors.left: hexcode.left
anchors.right: hexcode.right
anchors.top: hexcode.bottom
margin-top: 5
ColorPickerNode
id: red
anchors.right: colorPreviewer.left
anchors.top: colorPreviewer.top
anchors.left: parent.left
margin-left: 10
margin-right: 10
ColorPickerNode
id: green
anchors.left: prev.left
anchors.right: prev.right
anchors.top: prev.bottom
margin-top: 6
ColorPickerNode
id: blue
anchors.left: prev.left
anchors.right: prev.right
anchors.top: prev.bottom
margin-top: 6
ColorPickerNode
id: alpha
anchors.left: prev.left
anchors.right: prev.right
anchors.top: prev.bottom
margin-top: 6
Button
id: doneButton
text: Done
anchors.left: applyHexButton.left
anchors.right: applyHexButton.right
anchors.bottom: alpha.bottom
margin-top: 25
color: #3cc85d
image-color: #3cc85d