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.
This commit is contained in:
parent
2246b01c4b
commit
6efc5ecefe
6 changed files with 742 additions and 287 deletions
|
@ -40,6 +40,7 @@ pub struct ProjectPanelSettings {
|
|||
pub git_status: bool,
|
||||
pub indent_size: f32,
|
||||
pub indent_guides: IndentGuidesSettings,
|
||||
pub sticky_scroll: bool,
|
||||
pub auto_reveal_entries: bool,
|
||||
pub auto_fold_dirs: bool,
|
||||
pub scrollbar: ScrollbarSettings,
|
||||
|
@ -150,6 +151,10 @@ pub struct ProjectPanelSettingsContent {
|
|||
///
|
||||
/// Default: false
|
||||
pub hide_root: Option<bool>,
|
||||
/// Whether to stick parent directories at top of the project panel.
|
||||
///
|
||||
/// Default: true
|
||||
pub sticky_scroll: Option<bool>,
|
||||
}
|
||||
|
||||
impl Settings for ProjectPanelSettings {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue