nav-scrollable: don't show context if the nav is too small
[?]
Jul 30, 2025, 10:02 AM
WQYUCUNB7Z7IT6IU2EEOTQNBDMKASZMNHTRQTETNVU52TYYZ6IQACDependencies
- [2]
XHWLKCLDauto-scroll past skip sections on load - [3]
K5YUSV2Wauto-scroll to last offset - [4]
KWTBNTO3diffs selection and scrolling - [5]
5MUEECMJsmooth scrolling nav - [6]
RDRBP7ALauto-scroll status selection - [7]
UR4J677Rnav for log changes and refactors - [8]
3TLPJ57Balt scroll via context and couple fixes - [9]
WW36JYLRadd iced_nav_scrollable widget crate
Change contents
- edit in iced_nav_scrollable/src/lib.rs at line 304
let context_height = context_height(nav.height); - replacement in iced_nav_scrollable/src/lib.rs at line 315
VISIBLE_CONTEXT_HEIGHT,context_height, - replacement in iced_nav_scrollable/src/lib.rs at line 332
saturating_sub(*offset, VISIBLE_CONTEXT_HEIGHT),saturating_sub(*offset, context_height), - edit in iced_nav_scrollable/src/lib.rs at line 383
let context_height = context_height(nav.height); - replacement in iced_nav_scrollable/src/lib.rs at line 393
let top_frame = nav.stored_offset.unwrap_or_default()+ VISIBLE_CONTEXT_HEIGHT;let top_frame =nav.stored_offset.unwrap_or_default() + context_height; - replacement in iced_nav_scrollable/src/lib.rs at line 413
> nav.height- VISIBLE_CONTEXT_HEIGHT- VISIBLE_CONTEXT_HEIGHT> nav.height - context_height - context_height - replacement in iced_nav_scrollable/src/lib.rs at line 418
offset + height + VISIBLE_CONTEXT_HEIGHT,offset + height + context_height, - replacement in iced_nav_scrollable/src/lib.rs at line 424
saturating_sub(*offset, VISIBLE_CONTEXT_HEIGHT)saturating_sub(*offset, context_height) - edit in iced_nav_scrollable/src/lib.rs at line 513
let context_height = context_height(nav.height); - replacement in iced_nav_scrollable/src/lib.rs at line 526
VISIBLE_CONTEXT_HEIGHT,context_height, - replacement in iced_nav_scrollable/src/lib.rs at line 528
let top_frame =nav.stored_offset.unwrap_or_default() + VISIBLE_CONTEXT_HEIGHT;let top_frame = nav.stored_offset.unwrap_or_default() + context_height; - replacement in iced_nav_scrollable/src/lib.rs at line 530
Some(saturating_sub(offset + height + VISIBLE_CONTEXT_HEIGHT,nav.height,))Some(saturating_sub(offset + height + context_height, nav.height)) - replacement in iced_nav_scrollable/src/lib.rs at line 532
Some(saturating_sub(*offset, VISIBLE_CONTEXT_HEIGHT))Some(saturating_sub(*offset, context_height)) - edit in iced_nav_scrollable/src/lib.rs at line 549
let context_height = context_height(nav.height); - replacement in iced_nav_scrollable/src/lib.rs at line 562
VISIBLE_CONTEXT_HEIGHT,context_height, - replacement in iced_nav_scrollable/src/lib.rs at line 564
let top_frame =nav.stored_offset.unwrap_or_default() + VISIBLE_CONTEXT_HEIGHT;let top_frame = nav.stored_offset.unwrap_or_default() + context_height; - replacement in iced_nav_scrollable/src/lib.rs at line 566
Some(saturating_sub(*offset, VISIBLE_CONTEXT_HEIGHT))Some(saturating_sub(*offset, context_height)) - replacement in iced_nav_scrollable/src/lib.rs at line 568
Some(saturating_sub(offset + height + VISIBLE_CONTEXT_HEIGHT,nav.height,))Some(saturating_sub(offset + height + context_height, nav.height)) - edit in iced_nav_scrollable/src/lib.rs at line 632
let context_height = context_height(nav.height); - replacement in iced_nav_scrollable/src/lib.rs at line 642
let y = saturating_sub(y, VISIBLE_CONTEXT_HEIGHT);let y = saturating_sub(y, context_height); - edit in iced_nav_scrollable/src/lib.rs at line 740
0.0}}// Don't show context when the nav is too small.fn context_height(nav_height: f32) -> f32 {if nav_height < VISIBLE_CONTEXT_HEIGHT + VISIBLE_CONTEXT_HEIGHT { - edit in iced_nav_scrollable/src/lib.rs at line 748
} else {VISIBLE_CONTEXT_HEIGHT