Introduce text::Alignment with Justified support
This commit is contained in:
parent
e45d4b5cb6
commit
0e4a392731
30 changed files with 227 additions and 195 deletions
|
|
@ -93,7 +93,7 @@ pub struct Toggler<
|
|||
size: f32,
|
||||
text_size: Option<Pixels>,
|
||||
text_line_height: text::LineHeight,
|
||||
text_alignment: Option<alignment::Horizontal>,
|
||||
text_alignment: text::Alignment,
|
||||
text_shaping: text::Shaping,
|
||||
text_wrapping: text::Wrapping,
|
||||
spacing: f32,
|
||||
|
|
@ -127,7 +127,7 @@ where
|
|||
size: Self::DEFAULT_SIZE,
|
||||
text_size: None,
|
||||
text_line_height: text::LineHeight::default(),
|
||||
text_alignment: None,
|
||||
text_alignment: text::Alignment::Default,
|
||||
text_shaping: text::Shaping::default(),
|
||||
text_wrapping: text::Wrapping::default(),
|
||||
spacing: Self::DEFAULT_SIZE / 2.0,
|
||||
|
|
@ -197,9 +197,9 @@ where
|
|||
/// Sets the horizontal alignment of the text of the [`Toggler`]
|
||||
pub fn text_alignment(
|
||||
mut self,
|
||||
alignment: impl Into<alignment::Horizontal>,
|
||||
alignment: impl Into<text::Alignment>,
|
||||
) -> Self {
|
||||
self.text_alignment = Some(alignment.into());
|
||||
self.text_alignment = alignment.into();
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue