diff --git a/examples/counter.rs b/examples/counter.rs index 3ec27951662aaf7a8a1f8066ec65f2bde3ac4791..f86de9d88de70ef89ba24632b00f4f9e67233900 100644 --- a/examples/counter.rs +++ b/examples/counter.rs @@ -40,7 +40,7 @@ fn Counter(context: &mut KayakContext) { <Window position={(50.0, 50.0)} size={(300.0, 300.0)} title={"Counter Example".to_string()}> <Text styles={Some(text_styles)} size={32.0} content={format!("Current Count: {}", count).to_string()}>{}</Text> <Button on_event={Some(on_event)}> - <Text styles={Some(button_text_styles)} size={24.0} content={"Count!".to_string()}>{}</Text> + <Text styles={Some(button_text_styles)} line_height={Some(40.0)} size={24.0} content={"Count!".to_string()}>{}</Text> </Button> </Window> </> diff --git a/examples/hooks.rs b/examples/hooks.rs index 7152bde81ee6329cf32ce8de946ad5723c36e042..3f10b788efb0bdf49fb839b493d1e4266fe6d748 100644 --- a/examples/hooks.rs +++ b/examples/hooks.rs @@ -47,7 +47,7 @@ fn StateCounter() { <Window position={(50.0, 50.0)} size={(300.0, 150.0)} title={"State Example".to_string()}> <Text size={16.0} content={format!("Current Count: {}", count)} /> <Button on_event={Some(on_event)}> - <Text size={24.0} content={"Count!".to_string()} /> + <Text line_height={Some(40.0)} size={24.0} content={"Count!".to_string()} /> </Button> </Window> } @@ -110,7 +110,7 @@ fn EffectCounter() { <Text size={16.0} content={format!("Actual Count: {}", count)} /> <Text size={16.0} content={format!("Doubled Count: {}", effect_count)} /> <Button on_event={Some(on_event)}> - <Text size={24.0} content={"Count!".to_string()} /> + <Text line_height={Some(40.0)} size={24.0} content={"Count!".to_string()} /> </Button> </Window> } diff --git a/examples/if.rs b/examples/if.rs index dcccd5eb7ea558ddfc2837fab245b5a90a52e805..f6d1e5ba38a0eebb3b2213d0cc813e111c38bc16 100644 --- a/examples/if.rs +++ b/examples/if.rs @@ -38,7 +38,7 @@ fn Removal(context: &mut KayakContext) { <Text styles={Some(text_styles)} size={32.0} content={"Hello!".to_string()} /> </If> <Button on_event={Some(on_event)}> - <Text line_height={Some(45.0)} size={24.0} content={"Swap!".to_string()} /> + <Text line_height={Some(40.0)} size={24.0} content={"Swap!".to_string()} /> </Button> </Window> </> diff --git a/examples/todo/card.rs b/examples/todo/card.rs index 06cf2217bc24beb08bacff3bf51ff771864b2e3a..78ea8f1e3913be1a5af62c5a3fdadeefecfc5837 100644 --- a/examples/todo/card.rs +++ b/examples/todo/card.rs @@ -32,7 +32,7 @@ pub fn Card(card_id: usize, name: String, on_delete: Handler<usize>) { rsx! { <Background styles={Some(background_styles)}> - <Text size={14.0} content={name} /> + <Text line_height={Some(26.0)} size={14.0} content={name} /> <DeleteButton on_event={Some(on_event)} /> </Background> } diff --git a/examples/vec_widget.rs b/examples/vec_widget.rs index fd0f7ec76f0c5ce00da0396646a4ede964e53d94..432f005c3185fef5d03b04de0eb0adea79d985f3 100644 --- a/examples/vec_widget.rs +++ b/examples/vec_widget.rs @@ -17,7 +17,10 @@ fn startup( font_mapping.add("Roboto", asset_server.load("roboto.kayak_font")); let context = BevyContext::new(|context| { - let data = vec!["Text1", "Text2", "Text3", "Text4"]; + let data = vec![ + "Text 1", "Text 2", "Text 3", "Text 4", "Text 5", "Text 6", "Text 7", "Text 8", + "Text 9", "Text 10", + ]; render! { <App> {VecTracker::from(data.iter().map(|data| { diff --git a/src/widgets/button.rs b/src/widgets/button.rs index 1831f77234c010a31c17e4ff9e1b480096a631c6..5c05b4dedd50dd50cef921c6cb30b1e5fe2b55c9 100644 --- a/src/widgets/button.rs +++ b/src/widgets/button.rs @@ -24,8 +24,6 @@ pub fn Button(children: Children, styles: Option<Style>) { }, padding_left: StyleProp::Value(Units::Stretch(1.0)), padding_right: StyleProp::Value(Units::Stretch(1.0)), - padding_top: StyleProp::Value(Units::Stretch(1.0)), - padding_bottom: StyleProp::Value(Units::Stretch(1.0)), ..base_styles }); rsx! { diff --git a/src/widgets/text_box.rs b/src/widgets/text_box.rs index 407f6a8791bebde7621bfa662c81c8c6bbee060d..a6f2cfbad0e09945957c9513b46506a8a5ced338 100644 --- a/src/widgets/text_box.rs +++ b/src/widgets/text_box.rs @@ -120,6 +120,7 @@ pub fn TextBox(value: String, on_change: Option<OnChange>, placeholder: Option<S <Text content={value} size={14.0} + line_height={Some(22.0)} styles={Some(text_styles)} /> </Clip>