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:
Rob Parrett 2024-09-02 15:48:48 -07:00 committed by GitHub
parent 96942058f7
commit 86d5944b2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 14 deletions

View file

@ -90,8 +90,8 @@ fn spawn_text(commands: &mut Commands, app_status: &AppStatus) {
}
.with_style(Style {
position_type: PositionType::Absolute,
bottom: Val::Px(10.0),
left: Val::Px(10.0),
bottom: Val::Px(12.0),
left: Val::Px(12.0),
..default()
}),
);

View file

@ -150,8 +150,8 @@ fn setup(
commands.spawn((
TextBundle::from_section("", text_style).with_style(Style {
position_type: PositionType::Absolute,
top: Val::Px(10.0),
right: Val::Px(10.0),
top: Val::Px(12.0),
right: Val::Px(12.0),
..default()
}),
ExampleDisplay,

View file

@ -143,8 +143,8 @@ fn add_buttons(commands: &mut Commands, font: &Handle<Font>, color_grading: &Col
flex_direction: FlexDirection::Column,
position_type: PositionType::Absolute,
row_gap: Val::Px(6.0),
left: Val::Px(10.0),
bottom: Val::Px(10.0),
left: Val::Px(12.0),
bottom: Val::Px(12.0),
..default()
},
..default()
@ -318,8 +318,8 @@ fn add_help_text(
.spawn(TextBundle {
style: Style {
position_type: PositionType::Absolute,
left: Val::Px(10.0),
top: Val::Px(10.0),
left: Val::Px(12.0),
top: Val::Px(12.0),
..default()
},
..TextBundle::from_section(

View file

@ -144,8 +144,8 @@ fn setup_ui(mut commands: Commands) {
)
.with_style(Style {
position_type: PositionType::Absolute,
left: Val::Px(10.0),
top: Val::Px(10.0),
left: Val::Px(12.0),
top: Val::Px(12.0),
..default()
}),
);
@ -157,8 +157,8 @@ fn setup_ui(mut commands: Commands) {
flex_direction: FlexDirection::Column,
position_type: PositionType::Absolute,
row_gap: Val::Px(6.0),
left: Val::Px(10.0),
bottom: Val::Px(10.0),
left: Val::Px(12.0),
bottom: Val::Px(12.0),
..default()
},
..default()

View file

@ -23,8 +23,8 @@ fn setup(
text: Text::from_section("Click Me to get a box", TextStyle::default()),
style: Style {
position_type: PositionType::Absolute,
top: Val::Percent(10.0),
left: Val::Percent(10.0),
top: Val::Percent(12.0),
left: Val::Percent(12.0),
..default()
},
..Default::default()