Skip to content

Commit

Permalink
Render field color in labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Aug 27, 2024
1 parent b468add commit 912d1b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,11 @@ impl ProfApp {

body.row(height, |mut row| {
row.col(|ui| {
ui.strong(k);
if let Some(color) = color {
ui.label(RichText::new(k).color(color).strong());
} else {
ui.strong(k);
}
});
row.col(|ui| {
if let Some(x) =
Expand Down
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,11 @@ impl RandomDataSource {
Field::Interval(Interval::new(start, stop)),
None,
),
(self.item_uid_field, Field::U64(item_uid.0), None),
(
self.item_uid_field,
Field::U64(item_uid.0),
Some(Color32::RED),
),
],
});
}
Expand Down

0 comments on commit 912d1b9

Please sign in to comment.