Skip to content

Commit

Permalink
debug_ui: Improve span list for text fields
Browse files Browse the repository at this point in the history
Narrower table and more information!
  • Loading branch information
kjarosh authored and Dinnerbone committed Oct 18, 2024
1 parent f577e34 commit c39e8ad
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions core/src/debug_ui/display_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,22 +493,18 @@ impl DisplayObjectWindow {
.num_columns(7)
.striped(true)
.show(ui, |ui| {
ui.label("Start");
ui.label("End");
ui.label("Length");
ui.label("Span");
ui.label("URL");
ui.label("Font");
ui.label("Style");
ui.label("Text");
ui.end_row();

for (start, end, text, format) in object.spans().iter_spans() {
ui.label(start.to_string());
ui.label(end.to_string());
ui.label(format!("{}–{} ({})", start, end, format.span_length));

ui.label(format.span_length.to_string());
ui.label(format.url.to_string());
ui.label(format.font.face.to_string());
ui.label(format!("{}, {}", format.font.face, format.font.size));

if format.style.bold && format.style.italic {
ui.label("Bold Italic");
Expand Down

0 comments on commit c39e8ad

Please sign in to comment.