Add ui_font_size
setting (#3199)
This PR adds a new `ui_font_size` setting that can be used to control the scale of the entire UI. We use the value in this setting to set the base rem size of the window. Release Notes: - N/A
This commit is contained in:
parent
bd61d71018
commit
b910bbf002
12 changed files with 58 additions and 50 deletions
|
@ -1,4 +1,4 @@
|
|||
use gpui2::{relative, Hsla, WindowContext};
|
||||
use gpui2::{relative, rems, Hsla, WindowContext};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use crate::prelude::*;
|
||||
|
@ -86,7 +86,7 @@ impl Label {
|
|||
.bg(LabelColor::Hidden.hsla(cx)),
|
||||
)
|
||||
})
|
||||
.text_size(ui_size(cx, 1.))
|
||||
.text_size(rems(1.))
|
||||
.when(self.line_height_style == LineHeightStyle::UILabel, |this| {
|
||||
this.line_height(relative(1.))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue