Support configurable LineHeight in text widgets
This commit is contained in:
parent
8e8808f0e1
commit
9499a8f9e6
24 changed files with 337 additions and 42 deletions
|
|
@ -1,3 +1,5 @@
|
|||
use crate::Pixels;
|
||||
|
||||
/// The strategy used to fill space in a specific dimension.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum Length {
|
||||
|
|
@ -36,6 +38,12 @@ impl Length {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Pixels> for Length {
|
||||
fn from(amount: Pixels) -> Self {
|
||||
Length::Fixed(f32::from(amount))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<f32> for Length {
|
||||
fn from(amount: f32) -> Self {
|
||||
Length::Fixed(amount)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue