Remove unnecessary result in line shaping (#30721)
Updates #29879 Release Notes: - N/A
This commit is contained in:
@@ -106,10 +106,7 @@ impl TableView {
|
||||
|
||||
for field in table.schema.fields.iter() {
|
||||
runs[0].len = field.name.len();
|
||||
let mut width = text_system
|
||||
.layout_line(&field.name, font_size, &runs)
|
||||
.map(|layout| layout.width)
|
||||
.unwrap_or(px(0.));
|
||||
let mut width = text_system.layout_line(&field.name, font_size, &runs).width;
|
||||
|
||||
let Some(data) = table.data.as_ref() else {
|
||||
widths.push(width);
|
||||
@@ -122,8 +119,7 @@ impl TableView {
|
||||
let cell_width = window
|
||||
.text_system()
|
||||
.layout_line(&content, font_size, &runs)
|
||||
.map(|layout| layout.width)
|
||||
.unwrap_or(px(0.));
|
||||
.width;
|
||||
|
||||
width = width.max(cell_width)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user