Skip to content

Commit

Permalink
Fix some examples having different instruction text positions (#15017)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
rparrett authored Sep 2, 2024
1 parent 9694205 commit 86d5944
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions examples/3d/anisotropy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}),
);
Expand Down
4 changes: 2 additions & 2 deletions examples/3d/auto_exposure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions examples/3d/color_grading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions examples/animation/animation_masks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}),
);
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions examples/picking/simple_picking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 86d5944

Please sign in to comment.