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
+3 -3
View File
@@ -116,9 +116,9 @@ impl epi::App for HttpApp {
}
Err(error) => {
// This should only happen if the fetch API isn't available or something similar.
ui.add(
egui::Label::new(if error.is_empty() { "Error" } else { error })
.text_color(egui::Color32::RED),
ui.colored_label(
egui::Color32::RED,
if error.is_empty() { "Error" } else { error },
);
}
}