Future-proof indent guides settings for panels (#19878)

This PR ensures that we do not have to break the indent guides settings
for the project/outline panel. In the future we might want to have a
more granular way to control when to show indent guides, or control
other indent guide properties, like its width.

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2024-10-29 09:52:36 +01:00 committed by GitHub
parent 719a7f7890
commit b5c41eeb98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 117 additions and 34 deletions

View file

@ -35,7 +35,7 @@ use itertools::Itertools;
use language::{BufferId, BufferSnapshot, OffsetRangeExt, OutlineItem};
use menu::{Cancel, SelectFirst, SelectLast, SelectNext, SelectPrev};
use outline_panel_settings::{OutlinePanelDockPosition, OutlinePanelSettings};
use outline_panel_settings::{OutlinePanelDockPosition, OutlinePanelSettings, ShowIndentGuides};
use project::{File, Fs, Item, Project};
use search::{BufferSearchBar, ProjectSearchView};
use serde::{Deserialize, Serialize};
@ -3748,7 +3748,7 @@ impl Render for OutlinePanel {
let pinned = self.pinned;
let settings = OutlinePanelSettings::get_global(cx);
let indent_size = settings.indent_size;
let show_indent_guides = settings.indent_guides;
let show_indent_guides = settings.indent_guides.show == ShowIndentGuides::Always;
let outline_panel = v_flex()
.id("outline-panel")