1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Rich text for all widgets (#855)

Introduce `RichText` and `WidgetText`
This commit is contained in:
Emil Ernerfeldt
2021-11-01 21:30:10 +01:00
committed by GitHub
parent 9378cd5c6e
commit 09b8269326
30 changed files with 1121 additions and 712 deletions

View File

@@ -237,5 +237,5 @@ fn clock_button(ui: &mut egui::Ui, seconds_since_midnight: f64) -> egui::Respons
(time % 1.0 * 100.0).floor()
);
ui.add(egui::Button::new(time).text_style(egui::TextStyle::Monospace))
ui.button(egui::RichText::new(time).monospace())
}