Re-export variants of Length and alignment types
This commit is contained in:
parent
f9dd5cbb09
commit
76737351ea
51 changed files with 255 additions and 395 deletions
|
|
@ -88,37 +88,8 @@ where
|
|||
|
||||
/// Centers the [`Text`], both horizontally and vertically.
|
||||
pub fn center(self) -> Self {
|
||||
self.center_x().center_y()
|
||||
}
|
||||
|
||||
/// Centers the [`Text`] horizontally.
|
||||
pub fn center_x(self) -> Self {
|
||||
self.align_x(alignment::center())
|
||||
}
|
||||
|
||||
/// Aligns the [`Text`] to the left, the default.
|
||||
pub fn align_left(self) -> Self {
|
||||
self.align_x(alignment::left())
|
||||
}
|
||||
|
||||
/// Aligns the [`Text`] to the right.
|
||||
pub fn align_right(self) -> Self {
|
||||
self.align_x(alignment::right())
|
||||
}
|
||||
|
||||
/// Centers the [`Text`] vertically.
|
||||
pub fn center_y(self) -> Self {
|
||||
self.align_y(alignment::center())
|
||||
}
|
||||
|
||||
/// Aligns the [`Text`] to the top, the default.
|
||||
pub fn align_top(self) -> Self {
|
||||
self.align_y(alignment::top())
|
||||
}
|
||||
|
||||
/// Aligns the [`Text`] to the bottom.
|
||||
pub fn align_bottom(self) -> Self {
|
||||
self.align_y(alignment::bottom())
|
||||
self.align_x(alignment::Horizontal::Center)
|
||||
.align_y(alignment::Vertical::Center)
|
||||
}
|
||||
|
||||
/// Sets the [`alignment::Horizontal`] of the [`Text`].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue