Skip to content

Commit b7936af

Browse files
committed
Replace Unicode bullet chars with painted circles
The filled circle (U+25CF) and bullet (U+2022) characters are not in the built-in Latin fonts, rendering as tofu squares. Use painter.circle_filled() to draw actual circles instead.
1 parent 736256c commit b7936af

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/gui.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,12 @@ impl AcceleratorApp {
667667
ui.set_min_size(egui::vec2(0.0, 44.0));
668668
ui.vertical(|ui| {
669669
ui.horizontal(|ui| {
670-
ui.label(
671-
RichText::new("●")
672-
.font(FontId::proportional(12.0))
673-
.color(accent),
670+
let (dot_rect, _) = ui.allocate_exact_size(
671+
egui::vec2(12.0, 12.0),
672+
egui::Sense::hover(),
674673
);
674+
ui.painter()
675+
.circle_filled(dot_rect.center(), 5.0, accent);
675676
ui.label(
676677
RichText::new(match headline {
677678
"已接管" => "正在加速",
@@ -2135,11 +2136,12 @@ fn detail_value_row(ui: &mut egui::Ui, label: &str, value: &str) {
21352136

21362137
fn about_bullet(ui: &mut egui::Ui, text: &str) {
21372138
ui.horizontal_wrapped(|ui| {
2138-
ui.label(
2139-
RichText::new("•")
2140-
.font(FontId::proportional(14.0))
2141-
.strong()
2142-
.color(egui::Color32::from_rgb(243, 179, 74)),
2139+
let (dot_rect, _) =
2140+
ui.allocate_exact_size(egui::vec2(10.0, 14.0), egui::Sense::hover());
2141+
ui.painter().circle_filled(
2142+
egui::pos2(dot_rect.center().x, dot_rect.center().y),
2143+
3.5,
2144+
egui::Color32::from_rgb(243, 179, 74),
21432145
);
21442146
ui.label(
21452147
RichText::new(text)

0 commit comments

Comments
 (0)