Skip to content

Commit 5b7bb0b

Browse files
committed
rebase fixes
1 parent 0ff0261 commit 5b7bb0b

File tree

3 files changed

+8
-25
lines changed

3 files changed

+8
-25
lines changed

crates/bevy_text/src/text2d.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use bevy_ecs::{
1717
system::{Commands, Local, Query, Res, ResMut},
1818
};
1919
use bevy_math::Vec2;
20-
use bevy_render::sync_world::TemporaryRenderEntity;
2120
use bevy_reflect::{prelude::ReflectDefault, Reflect};
21+
use bevy_render::sync_world::TemporaryRenderEntity;
2222
use bevy_render::view::Visibility;
2323
use bevy_render::{
2424
primitives::Aabb,

crates/bevy_ui/src/render/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ pub fn extract_text_sections(
655655
atlas_info,
656656
span_index,
657657
..
658-
}
658+
},
659659
) in text_layout_info.glyphs.iter().enumerate()
660660
{
661661
if *span_index != current_span {
@@ -687,8 +687,7 @@ pub fn extract_text_sections(
687687
.glyphs
688688
.get(i + 1)
689689
.map(|info| {
690-
info.section_index != *section_index
691-
|| info.atlas_info.texture != atlas_info.texture
690+
info.span_index != current_span || info.atlas_info.texture != atlas_info.texture
692691
})
693692
.unwrap_or(true)
694693
{
@@ -698,7 +697,7 @@ pub fn extract_text_sections(
698697
id,
699698
ExtractedUiNode {
700699
stack_index: uinode.stack_index,
701-
color: LinearRgba::from(text.sections[*section_index].style.color),
700+
color,
702701
image: atlas_info.texture.id(),
703702
clip: clip.map(|clip| clip.clip),
704703
camera_entity: render_camera_entity.id(),

examples/ui/text_debug.rs

+4-20
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ fn infotext_system(mut commands: Commands, asset_server: Res<AssetServer>) {
9595
Style {
9696
max_width: Val::Px(300.),
9797
..default()
98-
})
99-
.with_background_color(background_color)
98+
},
99+
BackgroundColor(background_color)
100+
)
100101
);
101102
}).id();
102103

@@ -124,8 +125,7 @@ fn infotext_system(mut commands: Commands, asset_server: Res<AssetServer>) {
124125
Style {
125126
max_width: Val::Px(400.),
126127
..default()
127-
})
128-
.with_background_color(background_color)
128+
},BackgroundColor(background_color))
129129
);
130130

131131
builder.spawn((Text::new(
@@ -144,22 +144,6 @@ fn infotext_system(mut commands: Commands, asset_server: Res<AssetServer>) {
144144
BackgroundColor(background_color)
145145
));
146146

147-
builder.spawn((
148-
Text::new( "This text is fully justified and is positioned in the same way."),
149-
TextStyle {
150-
font: font.clone(),
151-
font_size: 29.0,
152-
color: GREEN_YELLOW.into(),
153-
..default()
154-
},
155-
TextBlock::new_with_justify(JustifyText::Justified),
156-
Style {
157-
max_width: Val::Px(300.),
158-
..default()
159-
},
160-
BackgroundColor(background_color)
161-
));
162-
163147
builder.spawn((
164148
Text::new("This text is fully justified and is positioned in the same way."),
165149
TextStyle {

0 commit comments

Comments
 (0)