welcome screen centered
This commit is contained in:
parent
92776105b3
commit
b7b73490c5
3 changed files with 11 additions and 13 deletions
|
@ -18,7 +18,7 @@ cargo run --profile=small
|
|||
|
||||
# Android
|
||||
cargo makepad android run --release
|
||||
|
||||
cargo makepad android run -p simplestacknavigation --release
|
||||
# IOS Simulator
|
||||
cargo makepad apple ios --org=my.test --app=makepad-template run-sim --release
|
||||
|
||||
|
|
12
src/app.rs
12
src/app.rs
|
@ -38,6 +38,10 @@ live_design!{
|
|||
App = {{App}} {
|
||||
|
||||
ui: <Window>{
|
||||
window: {
|
||||
position: vec2(0, 0),
|
||||
// inner_size: vec2(360, 800)
|
||||
},
|
||||
show_bg: true
|
||||
width: Fill,
|
||||
height: Fill
|
||||
|
@ -148,13 +152,5 @@ impl AppMain for App{
|
|||
&actions,
|
||||
&self.navigation_destinations
|
||||
);
|
||||
|
||||
|
||||
if self.ui.button(id!(button1)).clicked(&actions) {
|
||||
log!("BUTTON CLICKED {}", self.counter);
|
||||
self.counter += 1;
|
||||
let label = self.ui.label(id!(label1));
|
||||
label.set_text_and_redraw(cx,&format!("Counter: {}", self.counter));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -49,11 +49,12 @@ live_design! {
|
|||
height: Fill
|
||||
show_bg: false
|
||||
// align:{ x: 0.5 }
|
||||
align: {x: 0.5, y: 0.5}
|
||||
container = <RoundedView> {
|
||||
width: Fit
|
||||
height: Fill
|
||||
width: 360
|
||||
height: 400
|
||||
// flow: Down
|
||||
align: {x: 0.5, y: 0.0}
|
||||
align: {x: 0.5, y: 0.5}
|
||||
// margin: {left: 200.0, right: 200.0, top: 100.0, bottom: 100.0}
|
||||
spacing: 2.0
|
||||
draw_bg: {
|
||||
|
@ -65,7 +66,8 @@ live_design! {
|
|||
<View> {
|
||||
width: Fit, height: Fill
|
||||
flow: Down,
|
||||
align: {x: 0, y: 0.5}, padding: {top: 5., left: 10., right: 10.}, spacing: 20.
|
||||
align: {x: 0, y: 0.5},
|
||||
padding: {top: 5., left: 10., right: 10.}, spacing: 20.
|
||||
username = <Label> {
|
||||
// padding: {top: 50., left: 140.}
|
||||
draw_text:{
|
||||
|
|
Loading…
Reference in a new issue