@@ -17,23 +17,28 @@ live_design! {
17
17
height : 100.0 ,
18
18
width : Fill ,
19
19
spacing : 10.0 ,
20
+ flow : Down ,
20
21
<Label >{
21
22
text : " GLabel"
22
23
}
23
- <GLabel >{
24
- text : " Hello, world! This is a long message, but I use wrap Word to wrap it!" ,
25
- height : 48.0 ,
26
- width : 120.0 ,
27
- wrap : Word ,
28
- brightness : 1.5 ,
29
- margin : {left : 12.0 },
30
- }
31
- <GLabel >{
32
- text : " bold, test bold!!" ,
33
- font_size : 12.0 ,
34
- padding : 16.0 ,
35
- color : #FF0000 ,
36
- font_family : dep (" E:/Rust/try/makepad/Gen-UI/examples/gen_widget_example/resources/GoNotoKurrent-Bold.ttf" ),
24
+ <GHLayout >{
25
+ height : Fit ,
26
+ width : Fill ,
27
+ spacing : 10.0 ,
28
+ <GLabel >{
29
+ text : " Hello, world! This is a long message, but I use wrap Word to wrap it!" ,
30
+ height : Fit ,
31
+ width : 120.0 ,
32
+ wrap : Word ,
33
+ margin : {left : 12.0 },
34
+ }
35
+ <GLabel >{
36
+ text : " test another font family!!" ,
37
+ font_size : 12.0 ,
38
+ padding : 16.0 ,
39
+ color : #FF0000 ,
40
+ font_family : dep (" crate://self/resources/AlimamaFangYuanTiVF-Thin.ttf" ),
41
+ }
37
42
}
38
43
}
39
44
}
@@ -45,19 +50,22 @@ live_design! {
45
50
| --| --| --| --|
46
51
| live| color| ` Vec4 ` | The color of the label.|
47
52
| live| font_size| ` f64 ` | The size of the font used in the label.|
48
- | live| brightness| ` f32 ` | The brightness level of the text.|
49
- | live| curve| ` f32 ` | The curve factor of the text.|
53
+ | live| brightness(unused) | ` f32 ` | The brightness level of the text.|
54
+ | live| curve(unused) | ` f32 ` | The curve factor of the text.|
50
55
| live| line_spacing| ` f64 ` | The line spacing of the text.|
51
56
| live| top_drop| ` f64 ` | The top drop of the text.|
52
57
| live| height_factor| ` f64 ` | The height factor of the text.|
53
58
| live| wrap| ` TextWrap ` | The text wrapping mode.|
54
59
| live| font_family| ` LiveDependency ` | The font family of the text.|
55
60
| live| visible| ` bool ` | Whether the label is visible.|
56
61
| deref| draw_text| ` DrawText ` | The ` DrawText ` component used for drawing the text.|
57
- | walk| walk| ` Walk ` | The ` Walk ` component for positioning.|
62
+ | walk| height| ` Size ` | The height of the label|
63
+ | walk| width| ` Size ` | The width of the label|
64
+ | walk| abs_pos| ` Option<DVec2> ` | abs position of the component|
65
+ | walk| margin| ` Margin ` | the margin around the component|
58
66
| live| align| ` Align ` | The alignment of the text.|
59
- | live| padding| ` Padding ` | The padding around the text.|
60
- | live| text| ` RcStringMut ` | The content of the label.|
67
+ | live| padding| ` Padding ` | The padding around the text. default ` 0.0 ` |
68
+ | live| text| ` ArcStringMut ` | The content of the label.|
61
69
62
70
## Event
63
71
0 commit comments