Skip to content
Snippets Groups Projects
Commit 5bd332ae authored by StarArawn's avatar StarArawn
Browse files

Mostly fixed up.

parent 5dc9dfd9
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ fn Counter(context: &mut KayakContext) { ...@@ -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()}> <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> <Text styles={Some(text_styles)} size={32.0} content={format!("Current Count: {}", count).to_string()}>{}</Text>
<Button on_event={Some(on_event)}> <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> </Button>
</Window> </Window>
</> </>
......
...@@ -47,7 +47,7 @@ fn StateCounter() { ...@@ -47,7 +47,7 @@ fn StateCounter() {
<Window position={(50.0, 50.0)} size={(300.0, 150.0)} title={"State Example".to_string()}> <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)} /> <Text size={16.0} content={format!("Current Count: {}", count)} />
<Button on_event={Some(on_event)}> <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> </Button>
</Window> </Window>
} }
...@@ -110,7 +110,7 @@ fn EffectCounter() { ...@@ -110,7 +110,7 @@ fn EffectCounter() {
<Text size={16.0} content={format!("Actual Count: {}", count)} /> <Text size={16.0} content={format!("Actual Count: {}", count)} />
<Text size={16.0} content={format!("Doubled Count: {}", effect_count)} /> <Text size={16.0} content={format!("Doubled Count: {}", effect_count)} />
<Button on_event={Some(on_event)}> <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> </Button>
</Window> </Window>
} }
......
...@@ -38,7 +38,7 @@ fn Removal(context: &mut KayakContext) { ...@@ -38,7 +38,7 @@ fn Removal(context: &mut KayakContext) {
<Text styles={Some(text_styles)} size={32.0} content={"Hello!".to_string()} /> <Text styles={Some(text_styles)} size={32.0} content={"Hello!".to_string()} />
</If> </If>
<Button on_event={Some(on_event)}> <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> </Button>
</Window> </Window>
</> </>
......
...@@ -32,7 +32,7 @@ pub fn Card(card_id: usize, name: String, on_delete: Handler<usize>) { ...@@ -32,7 +32,7 @@ pub fn Card(card_id: usize, name: String, on_delete: Handler<usize>) {
rsx! { rsx! {
<Background styles={Some(background_styles)}> <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)} /> <DeleteButton on_event={Some(on_event)} />
</Background> </Background>
} }
......
...@@ -17,7 +17,10 @@ fn startup( ...@@ -17,7 +17,10 @@ fn startup(
font_mapping.add("Roboto", asset_server.load("roboto.kayak_font")); font_mapping.add("Roboto", asset_server.load("roboto.kayak_font"));
let context = BevyContext::new(|context| { 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! { render! {
<App> <App>
{VecTracker::from(data.iter().map(|data| { {VecTracker::from(data.iter().map(|data| {
......
...@@ -24,8 +24,6 @@ pub fn Button(children: Children, styles: Option<Style>) { ...@@ -24,8 +24,6 @@ pub fn Button(children: Children, styles: Option<Style>) {
}, },
padding_left: StyleProp::Value(Units::Stretch(1.0)), padding_left: StyleProp::Value(Units::Stretch(1.0)),
padding_right: 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 ..base_styles
}); });
rsx! { rsx! {
......
...@@ -120,6 +120,7 @@ pub fn TextBox(value: String, on_change: Option<OnChange>, placeholder: Option<S ...@@ -120,6 +120,7 @@ pub fn TextBox(value: String, on_change: Option<OnChange>, placeholder: Option<S
<Text <Text
content={value} content={value}
size={14.0} size={14.0}
line_height={Some(22.0)}
styles={Some(text_styles)} styles={Some(text_styles)}
/> />
</Clip> </Clip>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment