mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Fix some examples having different instruction text positions (#15017)
# Objective Thought I had found all of these... noticed some `10px` in #15013 and did another sweep. Continuation of #8478, #13583. ## Solution - Position example text (and other elements) 12px from the edge of the screen
This commit is contained in:
parent
96942058f7
commit
86d5944b2e
5 changed files with 14 additions and 14 deletions
|
@ -90,8 +90,8 @@ fn spawn_text(commands: &mut Commands, app_status: &AppStatus) {
|
||||||
}
|
}
|
||||||
.with_style(Style {
|
.with_style(Style {
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
bottom: Val::Px(10.0),
|
bottom: Val::Px(12.0),
|
||||||
left: Val::Px(10.0),
|
left: Val::Px(12.0),
|
||||||
..default()
|
..default()
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
@ -150,8 +150,8 @@ fn setup(
|
||||||
commands.spawn((
|
commands.spawn((
|
||||||
TextBundle::from_section("", text_style).with_style(Style {
|
TextBundle::from_section("", text_style).with_style(Style {
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
top: Val::Px(10.0),
|
top: Val::Px(12.0),
|
||||||
right: Val::Px(10.0),
|
right: Val::Px(12.0),
|
||||||
..default()
|
..default()
|
||||||
}),
|
}),
|
||||||
ExampleDisplay,
|
ExampleDisplay,
|
||||||
|
|
|
@ -143,8 +143,8 @@ fn add_buttons(commands: &mut Commands, font: &Handle<Font>, color_grading: &Col
|
||||||
flex_direction: FlexDirection::Column,
|
flex_direction: FlexDirection::Column,
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
row_gap: Val::Px(6.0),
|
row_gap: Val::Px(6.0),
|
||||||
left: Val::Px(10.0),
|
left: Val::Px(12.0),
|
||||||
bottom: Val::Px(10.0),
|
bottom: Val::Px(12.0),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
..default()
|
..default()
|
||||||
|
@ -318,8 +318,8 @@ fn add_help_text(
|
||||||
.spawn(TextBundle {
|
.spawn(TextBundle {
|
||||||
style: Style {
|
style: Style {
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
left: Val::Px(10.0),
|
left: Val::Px(12.0),
|
||||||
top: Val::Px(10.0),
|
top: Val::Px(12.0),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
..TextBundle::from_section(
|
..TextBundle::from_section(
|
||||||
|
|
|
@ -144,8 +144,8 @@ fn setup_ui(mut commands: Commands) {
|
||||||
)
|
)
|
||||||
.with_style(Style {
|
.with_style(Style {
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
left: Val::Px(10.0),
|
left: Val::Px(12.0),
|
||||||
top: Val::Px(10.0),
|
top: Val::Px(12.0),
|
||||||
..default()
|
..default()
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -157,8 +157,8 @@ fn setup_ui(mut commands: Commands) {
|
||||||
flex_direction: FlexDirection::Column,
|
flex_direction: FlexDirection::Column,
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
row_gap: Val::Px(6.0),
|
row_gap: Val::Px(6.0),
|
||||||
left: Val::Px(10.0),
|
left: Val::Px(12.0),
|
||||||
bottom: Val::Px(10.0),
|
bottom: Val::Px(12.0),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
..default()
|
..default()
|
||||||
|
|
|
@ -23,8 +23,8 @@ fn setup(
|
||||||
text: Text::from_section("Click Me to get a box", TextStyle::default()),
|
text: Text::from_section("Click Me to get a box", TextStyle::default()),
|
||||||
style: Style {
|
style: Style {
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
top: Val::Percent(10.0),
|
top: Val::Percent(12.0),
|
||||||
left: Val::Percent(10.0),
|
left: Val::Percent(12.0),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
Loading…
Reference in a new issue