Make anchoring explicit and improve reusability of text pipelines

This commit is contained in:
Héctor Ramón Jiménez 2025-05-04 03:54:42 +02:00
parent d643bd5ba2
commit 6bf709e03e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
13 changed files with 423 additions and 325 deletions

View file

@ -287,16 +287,18 @@ where
state,
renderer,
limits,
self.width,
Length::Shrink,
&self.label,
self.text_line_height,
self.text_size,
self.font,
text::Alignment::Default,
alignment::Vertical::Top,
self.text_shaping,
self.text_wrapping,
widget::text::Format {
width: self.width,
height: Length::Shrink,
line_height: self.text_line_height,
size: self.text_size,
font: self.font,
align_x: text::Alignment::Default,
align_y: alignment::Vertical::Top,
shaping: self.text_shaping,
wrapping: self.text_wrapping,
},
)
},
)
@ -436,8 +438,8 @@ where
crate::text::draw(
renderer,
defaults,
label_layout,
state.0.raw(),
label_layout.bounds(),
state.raw(),
crate::text::Style {
color: style.text_color,
},