Make anchoring explicit and improve reusability of text pipelines
This commit is contained in:
parent
d643bd5ba2
commit
6bf709e03e
13 changed files with 423 additions and 325 deletions
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue