1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Better text layout demo/test

This commit is contained in:
Emil Ernerfeldt
2024-09-19 09:50:37 +02:00
parent 44714285b0
commit 59e1b833e4

View File

@@ -580,8 +580,17 @@ fn text_layout_demo(ui: &mut Ui) {
}; };
job.append( job.append(
"This is a demonstration of ", "This",
first_row_indentation, first_row_indentation,
TextFormat {
color: default_color,
font_id: FontId::proportional(20.0),
..Default::default()
},
);
job.append(
" is a demonstration of ",
0.0,
TextFormat { TextFormat {
color: default_color, color: default_color,
..Default::default() ..Default::default()
@@ -632,7 +641,7 @@ fn text_layout_demo(ui: &mut Ui) {
"mixing ", "mixing ",
0.0, 0.0,
TextFormat { TextFormat {
font_id: FontId::proportional(17.0), font_id: FontId::proportional(20.0),
color: default_color, color: default_color,
..Default::default() ..Default::default()
}, },