notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 97aaa651d83671bce93a3cb87c3d44d0e387d54e
parent b0d0e451332b80a36e76d3f10b97239d31076e2b
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 16 Feb 2024 11:37:41 -0800

style: allow font style customization in the future

I had a work in progress commit that changed font styles that needed
this change, so doing it here for now.

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/app.rs | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/app.rs b/src/app.rs @@ -408,9 +408,7 @@ fn process_message(damus: &mut Damus, relay: &str, msg: &RelayMessage) { } fn render_damus(damus: &mut Damus, ctx: &Context) { - ctx.style_mut(|style| { - set_app_style(&mut style.visuals); - }); + ctx.style_mut(set_app_style); if is_mobile(ctx) { render_damus_mobile(ctx, damus); @@ -858,7 +856,8 @@ fn render_panel<'a>(ctx: &egui::Context, app: &'a mut Damus, timeline_ind: usize }); } -fn set_app_style(visuals: &mut Visuals) { +fn set_app_style(style: &mut Style) { + let visuals = &mut style.visuals; visuals.hyperlink_color = PURPLE; if visuals.dark_mode { visuals.override_text_color = Some(egui::Color32::from_rgb(250, 250, 250));