notedeck

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

commit 223af9ba391e4c3ab4a79c0c7505cc4c289720dd
parent e2b687e4894afa14c07e037f9c36b6e1a417480f
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 27 Feb 2026 13:37:30 -0800

fix: toolbar gap, mobile scroll visibility, and welcome screen overlap

- Use ui.available_height() for Tabs height so it matches the strip
  cell exactly, eliminating the gap between content and toolbar
- Add scroll_delta() that detects touch drag via pointer velocity,
  fixing scroll-to-hide on mobile where smooth_scroll_delta is zero
- Hide toolbar when welcome screen hasn't been completed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_chrome/src/chrome.rs | 21++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/crates/notedeck_chrome/src/chrome.rs b/crates/notedeck_chrome/src/chrome.rs @@ -456,7 +456,7 @@ impl Chrome { }; let is_narrow = notedeck::ui::is_narrow(ui.ctx()); - let toolbar_height = if is_narrow { + let toolbar_height = if is_narrow && ctx.settings.welcome_completed() { toolbar_visibility_height(skb_anim.skb_rect, ui) } else { 0.0 @@ -581,7 +581,7 @@ enum ChromeToolbarAction { fn toolbar_visibility_height(skb_rect: Option<Rect>, ui: &mut Ui) -> f32 { let toolbar_visible_id = egui::Id::new("chrome_toolbar_visible"); - let scroll_delta = ui.ctx().input(|i| i.smooth_scroll_delta.y); + let scroll_delta = scroll_delta(ui.ctx()); let velocity_threshold = 1.0; if scroll_delta > velocity_threshold { @@ -608,6 +608,20 @@ fn toolbar_visibility_height(skb_rect: Option<Rect>, ui: &mut Ui) -> f32 { } } +/// Detect vertical scroll intent from mouse wheel, trackpad, or touch drag. +fn scroll_delta(ctx: &egui::Context) -> f32 { + ctx.input(|i| { + let sd = i.smooth_scroll_delta.y; + if sd.abs() > 0.5 { + return sd; + } + if i.pointer.is_decidedly_dragging() { + return i.pointer.velocity().y; + } + 0.0 + }) +} + /// Render the Chrome mobile toolbar (Home, Chat, Search, Notifications). fn chrome_toolbar( ui: &mut Ui, @@ -650,12 +664,13 @@ fn chrome_toolbar( let notif_index = next_index; let tab_count = notif_index + 1; + let actual_height = ui.available_height(); let rs = Tabs::new(tab_count) .selected(0) .hover_bg(TabColor::none()) .selected_fg(TabColor::none()) .selected_bg(TabColor::none()) - .height(TOOLBAR_HEIGHT) + .height(actual_height) .layout(Layout::centered_and_justified(egui::Direction::TopDown)) .show(ui, |ui, state| { let index = state.index();