@@ -17,23 +17,28 @@ live_design! {
1717 height : 100.0 ,
1818 width : Fill ,
1919 spacing : 10.0 ,
20+ flow : Down ,
2021 <Label >{
2122 text : " GLabel"
2223 }
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+ }
3742 }
3843 }
3944}
@@ -45,19 +50,22 @@ live_design! {
4550| --| --| --| --|
4651| live| color| ` Vec4 ` | The color of the label.|
4752| 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.|
5055| live| line_spacing| ` f64 ` | The line spacing of the text.|
5156| live| top_drop| ` f64 ` | The top drop of the text.|
5257| live| height_factor| ` f64 ` | The height factor of the text.|
5358| live| wrap| ` TextWrap ` | The text wrapping mode.|
5459| live| font_family| ` LiveDependency ` | The font family of the text.|
5560| live| visible| ` bool ` | Whether the label is visible.|
5661| 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|
5866| 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.|
6169
6270## Event
6371
0 commit comments