BROKEN: Checkpoint
This commit is contained in:
parent
e4ca2cb20b
commit
6ecf629c63
4 changed files with 69 additions and 19 deletions
30
crates/ui2/src/styled_ext.rs
Normal file
30
crates/ui2/src/styled_ext.rs
Normal file
|
@ -0,0 +1,30 @@
|
|||
use gpui::Styled;
|
||||
|
||||
use crate::UITextSize;
|
||||
|
||||
pub trait StyledExt: Styled {
|
||||
fn text_ui_size(self, size: UITextSize) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
let size = size.rems();
|
||||
|
||||
self.text_size(size)
|
||||
}
|
||||
fn text_ui(self) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
let size = UITextSize::default().rems();
|
||||
|
||||
self.text_size(size)
|
||||
}
|
||||
fn text_ui_sm(self) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
let size = UITextSize::Small.rems();
|
||||
|
||||
self.text_size(size)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue