notedeck

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

commit 395ff57edf33c8e3a63b712b280ddbf557852332
parent 98a61c0aa78c2dbf378bbb4be69cad8198009a8f
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 20 Jun 2024 12:58:40 -0700

add vertical separators between timelines

Fixes: https://github.com/damus-io/notedeck/issues/52
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/app.rs | 17+++++++++++++++++
Msrc/timeline.rs | 1+
2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/app.rs b/src/app.rs @@ -1006,22 +1006,39 @@ fn timelines_view(ui: &mut egui::Ui, sizes: Size, app: &mut Damus, timelines: us .clip(true) .horizontal(|mut strip| { strip.cell(|ui| { + let rect = ui.available_rect_before_wrap(); let side_panel = DesktopSidePanel::new(app).show(ui); if side_panel.response.clicked() { info!("clicked {:?}", side_panel.action); } + DesktopSidePanel::perform_action(app, side_panel.action); + + // vertical sidebar line + ui.painter().vline( + rect.right(), + rect.y_range(), + ui.visuals().widgets.noninteractive.bg_stroke, + ); }); for timeline_ind in 0..timelines { strip.cell(|ui| { + let rect = ui.available_rect_before_wrap(); render_nav( app.timelines[timeline_ind].routes.clone(), timeline_ind, app, ui, ); + + // vertical line + ui.painter().vline( + rect.right(), + rect.y_range(), + ui.visuals().widgets.noninteractive.bg_stroke, + ); }); //strip.cell(|ui| timeline::timeline_view(ui, app, timeline_ind)); diff --git a/src/timeline.rs b/src/timeline.rs @@ -308,6 +308,7 @@ pub fn timeline_view(ui: &mut egui::Ui, app: &mut Damus, timeline: usize) { ui::padding(8.0, ui, |ui| { let textmode = app.textmode; let resp = ui::Note::new(app, &note).note_previews(!textmode).show(ui); + if let Some(action) = resp.action { debug!("bar action: {:?}", action); match action {