Update line heights, buttons to respond to UI scale
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
This commit is contained in:
co-authored by
Marshall Bowers
parent
7b2782c0f6
commit
7cb00aeb34
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
self as gpui3, hsla, point, px, relative, rems, AlignItems, Display, Fill, FlexDirection, Hsla,
|
||||
JustifyContent, Length, Position, Rems, SharedString, StyleRefinement,
|
||||
self as gpui3, hsla, point, px, relative, rems, AlignItems, DefiniteLength, Display, Fill,
|
||||
FlexDirection, Hsla, JustifyContent, Length, Position, Rems, SharedString, StyleRefinement,
|
||||
};
|
||||
use crate::{BoxShadow, TextStyleRefinement};
|
||||
use smallvec::smallvec;
|
||||
@@ -529,4 +529,14 @@ pub trait Styled {
|
||||
.font_family = Some(family_name.into());
|
||||
self
|
||||
}
|
||||
|
||||
fn line_height(mut self, line_height: impl Into<DefiniteLength>) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
self.text_style()
|
||||
.get_or_insert_with(Default::default)
|
||||
.line_height = Some(line_height.into());
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user