ZIm/crates/ui/src/components.rs
Smit Barmase 6efc5ecefe
project_panel: Add Sticky Scroll (#33994)
Closes #7243

- Adds `top_slot_items` to `uniform_list` component to offset list
items.
- Adds `ToPosition` scroll strategy to `uniform_list` to scroll list to
specified index.
- Adds `sticky_items` component which can be used along with
`uniform_list` to add sticky functionality to any view that implements
uniform list.


https://github.com/user-attachments/assets/eb508fa4-167e-4595-911b-52651537284c

Release Notes:

- Added sticky scroll to the project panel, which keeps parent
directories visible while scrolling. This feature is enabled by default.
To disable it, toggle `sticky_scroll` in settings.
2025-07-07 08:32:42 +05:30

81 lines
1.4 KiB
Rust

mod avatar;
mod banner;
mod button;
mod callout;
mod content_group;
mod context_menu;
mod disclosure;
mod divider;
mod dropdown_menu;
mod facepile;
mod group;
mod icon;
mod image;
mod indent_guides;
mod indicator;
mod keybinding;
mod keybinding_hint;
mod label;
mod list;
mod modal;
mod navigable;
mod notification;
mod numeric_stepper;
mod popover;
mod popover_menu;
mod progress;
mod radio;
mod right_click_menu;
mod scrollbar;
mod settings_container;
mod settings_group;
mod stack;
mod sticky_items;
mod tab;
mod tab_bar;
mod toggle;
mod tooltip;
#[cfg(feature = "stories")]
mod stories;
pub use avatar::*;
pub use banner::*;
pub use button::*;
pub use callout::*;
pub use content_group::*;
pub use context_menu::*;
pub use disclosure::*;
pub use divider::*;
pub use dropdown_menu::*;
pub use facepile::*;
pub use group::*;
pub use icon::*;
pub use image::*;
pub use indent_guides::*;
pub use indicator::*;
pub use keybinding::*;
pub use keybinding_hint::*;
pub use label::*;
pub use list::*;
pub use modal::*;
pub use navigable::*;
pub use notification::*;
pub use numeric_stepper::*;
pub use popover::*;
pub use popover_menu::*;
pub use progress::*;
pub use radio::*;
pub use right_click_menu::*;
pub use scrollbar::*;
pub use settings_container::*;
pub use settings_group::*;
pub use stack::*;
pub use sticky_items::*;
pub use tab::*;
pub use tab_bar::*;
pub use toggle::*;
pub use tooltip::*;
#[cfg(feature = "stories")]
pub use stories::*;