Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add padding to new text in ui example #12567

Merged
merged 2 commits into from Mar 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions examples/ui/ui.rs
Expand Up @@ -62,6 +62,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
style: Style {
width: Val::Percent(100.),
flex_direction: FlexDirection::Column,
padding: UiRect::all(Val::Px(5.)),
..default()
},
background_color: Color::srgb(0.15, 0.15, 0.15).into(),
Expand All @@ -77,11 +78,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
font_size: 30.0,
..default()
},
)
.with_style(Style {
margin: UiRect::all(Val::Px(5.)),
..default()
}),
),
// Because this is a distinct label widget and
// not button/list item text, this is necessary
// for accessibility to treat the text accordingly.
Expand Down