CI: fmt the narrow-layout commits, and Theme::hairline in place of their raw px
This commit is contained in:
1 parent
694cccbc81
commit
cb5e35f7cb
8 files changed
+69
-21
No files matched your search
@@ -18,13 +18,19 @@ pub(crate) fn text_width(
|
||||
let font_size = cx.theme().text_size(size).to_pixels(window.rem_size());
|
||||
let run = TextRun {
|
||||
len: text.len(),
|
||||
font: Font { weight, ..window.text_style().font() },
|
||||
font: Font {
|
||||
weight,
|
||||
..window.text_style().font()
|
||||
},
|
||||
color: Hsla::default(),
|
||||
background_color: None,
|
||||
underline: None,
|
||||
strikethrough: None,
|
||||
};
|
||||
window.text_system().shape_line(text.clone(), font_size, &[run], None).width
|
||||
window
|
||||
.text_system()
|
||||
.shape_line(text.clone(), font_size, &[run], None)
|
||||
.width
|
||||
}
|
||||
|
||||
/// Keeps `width` at the parent's width; a change redraws once.
|
||||
|
||||
Reference in new issue
Block a user