Remove unnecessary result in line shaping (#30721)
Updates #29879 Release Notes: - N/A
This commit is contained in:
parent
d791c6cdb1
commit
ff0060aa36
6 changed files with 118 additions and 155 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue