Measure maximum width of each cell to render table (#14026)
This commit is contained in:
parent
c4bca874b6
commit
4bb8a0845f
2 changed files with 97 additions and 33 deletions
|
@ -89,6 +89,7 @@ impl EditorBlock {
|
|||
let render = move |cx: &mut BlockContext| {
|
||||
let execution_view = execution_view.clone();
|
||||
let text_font = ThemeSettings::get_global(cx).buffer_font.family.clone();
|
||||
let text_font_size = ThemeSettings::get_global(cx).buffer_font_size;
|
||||
// Note: we'll want to use `cx.anchor_x` when someone runs something with no output -- just show a checkmark and not make the full block below the line
|
||||
|
||||
let gutter_width = cx.gutter_dimensions.width;
|
||||
|
@ -101,6 +102,7 @@ impl EditorBlock {
|
|||
.pl(gutter_width)
|
||||
.child(
|
||||
div()
|
||||
.text_size(text_font_size)
|
||||
.font_family(text_font)
|
||||
// .ml(gutter_width)
|
||||
.mx_1()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue