Files
notedeck/crates/notedeck_ui/src/profile/name.rs
William Casarin 8af80d7d10 ui: move note and profile rendering to notedeck_ui
We want to render notes in other apps like dave, so lets move
our note rendering to notedeck_ui. We rework NoteAction so it doesn't
have anything specific to notedeck_columns

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 12:34:43 -07:00

20 lines
533 B
Rust

use egui::RichText;
use notedeck::{NostrName, NotedeckTextStyle};
pub fn one_line_display_name_widget<'a>(
visuals: &egui::Visuals,
display_name: NostrName<'a>,
style: NotedeckTextStyle,
) -> impl egui::Widget + 'a {
let text_style = style.text_style();
let color = visuals.noninteractive().fg_stroke.color;
move |ui: &mut egui::Ui| -> egui::Response {
ui.label(
RichText::new(display_name.name())
.text_style(text_style)
.color(color),
)
}
}