mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
@@ -42,13 +42,10 @@ impl super::View for FontBook {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.spacing_mut().item_spacing.x = 0.0;
|
||||
ui.label("You can add more characters by installing additional fonts with ");
|
||||
ui.add(
|
||||
egui::Hyperlink::from_label_and_url(
|
||||
"Context::set_fonts",
|
||||
"https://docs.rs/egui/latest/egui/struct.Context.html#method.set_fonts",
|
||||
)
|
||||
.text_style(egui::TextStyle::Monospace),
|
||||
);
|
||||
ui.add(egui::Hyperlink::from_label_and_url(
|
||||
egui::RichText::new("Context::set_fonts").text_style(egui::TextStyle::Monospace),
|
||||
"https://docs.rs/egui/latest/egui/struct.Context.html#method.set_fonts",
|
||||
));
|
||||
ui.label(".");
|
||||
});
|
||||
|
||||
@@ -90,10 +87,13 @@ impl super::View for FontBook {
|
||||
|
||||
for (&chr, name) in named_chars {
|
||||
if filter.is_empty() || name.contains(filter) || *filter == chr.to_string() {
|
||||
let button = egui::Button::new(chr).text_style(text_style).frame(false);
|
||||
let button = egui::Button::new(
|
||||
egui::RichText::new(chr.to_string()).text_style(text_style),
|
||||
)
|
||||
.frame(false);
|
||||
|
||||
let tooltip_ui = |ui: &mut egui::Ui| {
|
||||
ui.add(egui::Label::new(chr).text_style(text_style));
|
||||
ui.label(egui::RichText::new(chr.to_string()).text_style(text_style));
|
||||
ui.label(format!("{}\nU+{:X}\n\nClick to copy", name, chr as u32));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user