Fix horizontal text alignment

This commit is contained in:
Héctor Ramón Jiménez 2025-03-11 00:43:51 +01:00
parent 35c0e14452
commit 179a34d37b
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
23 changed files with 141 additions and 67 deletions

View file

@ -24,7 +24,7 @@ pub trait Paragraph: Sized + Default {
fn compare(&self, text: Text<(), Self::Font>) -> Difference;
/// Returns the horizontal alignment of the [`Paragraph`].
fn horizontal_alignment(&self) -> alignment::Horizontal;
fn horizontal_alignment(&self) -> Option<alignment::Horizontal>;
/// Returns the vertical alignment of the [`Paragraph`].
fn vertical_alignment(&self) -> alignment::Vertical;
@ -108,7 +108,7 @@ impl<P: Paragraph> Plain<P> {
}
/// Returns the horizontal alignment of the [`Paragraph`].
pub fn horizontal_alignment(&self) -> alignment::Horizontal {
pub fn horizontal_alignment(&self) -> Option<alignment::Horizontal> {
self.raw.horizontal_alignment()
}