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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
use crate::{
makepad_widgets::*,
};
live_design!{
use link::theme::*;
use link::shaders::*;
use link::widgets::*;
use crate::layout_templates::*;
pub DemoLinkLabel = <UIZooTabLayout_B> {
desc = {
<Markdown> { body: dep("crate://self/resources/linklabel.md") }
}
demos = {
<H4> { text: "Standard" }
<UIZooRowH> {
<LinkLabel> { text: "Click me!"}
}
<Hr> {}
<H4> { text: "Standard, disabled" }
<UIZooRowH> {
<LinkLabel> {
text: "Click me!"
animator: {
disabled = {
default: on
}
}
}
}
<Hr> {}
<H4> { text: "LinkLabelGradientX" }
<UIZooRowH> {
<LinkLabelGradientX> { text: "<LinkLabelGradientX>"}
}
<Hr> {}
<H4> { text: "LinkLabelGradientY" }
<UIZooRowH> {
<LinkLabelGradientY> { text: "<LinkLabelGradientY>"}
}
<Hr> {}
<H4> { text: "LinkLabelIcon" }
<UIZooRowH> {
<LinkLabelIcon> {
text: "Click me!"
draw_icon: {
color: #f00,
svg_file: dep("crate://self/resources/Icon_Favorite.svg"),
}
icon_walk: {
width: 12.5, height: Fit,
margin: 0.0
}
}
<LinkLabelIcon> {
text: "Click me!"
draw_icon: {
svg_file: dep("crate://self/resources/Icon_Favorite.svg"),
}
icon_walk: {
width: 12.5,height: Fit,
margin: 0.0
}
}
}
<Hr> {}
<H4> { text: "Styling Attributes Reference" }
<UIZooRowH> {
<LinkLabel> {
label_walk: {
width: Fit,
height: Fit,
margin: { left: 10.}
}
draw_text: {
color: #A
color_hover: #C
color_down: #8
color_focus: #B
color_disabled: #3
text_style: {
font_size: 20.,
line_spacing: 1.4,
}
wrap: Word
}
draw_bg: {
color: #0A0
color_hover: #0C0
color_down: #080
color_focus: #0B0
color_disabled: #030
}
icon_walk: {
width: 20.
height: Fit,
}
draw_icon: {
color: #A00
color_hover: #C00
color_down: #800
color_focus: #B00
color_disabled: #300
svg_file: dep("crate://self/resources/Icon_Favorite.svg"),
}
text: "Click me!"
}
}
}
}
}