add indent size to project panel settings
This commit is contained in:
parent
95947f6d3a
commit
abb145da70
2 changed files with 10 additions and 7 deletions
|
@ -102,16 +102,18 @@
|
||||||
"show_other_hints": true
|
"show_other_hints": true
|
||||||
},
|
},
|
||||||
"project_panel": {
|
"project_panel": {
|
||||||
// Whether to show the git status in the project panel.
|
// Default width of the project panel.
|
||||||
"git_status": true,
|
"default_width": 240,
|
||||||
|
// Where to dock project panel. Can be 'left' or 'right'.
|
||||||
|
"dock": "left",
|
||||||
// Whether to show file icons in the project panel.
|
// Whether to show file icons in the project panel.
|
||||||
"file_icons": true,
|
"file_icons": true,
|
||||||
// Whether to show folder icons or chevrons for directories in the project panel.
|
// Whether to show folder icons or chevrons for directories in the project panel.
|
||||||
"folder_icons": true,
|
"folder_icons": true,
|
||||||
// Where to dock project panel. Can be 'left' or 'right'.
|
// Whether to show the git status in the project panel.
|
||||||
"dock": "left",
|
"git_status": true,
|
||||||
// Default width of the project panel.
|
// Amount of indentation for nested items.
|
||||||
"default_width": 240
|
"indent_size": 20
|
||||||
},
|
},
|
||||||
"assistant": {
|
"assistant": {
|
||||||
// Where to dock the assistant. Can be 'left', 'right' or 'bottom'.
|
// Where to dock the assistant. Can be 'left', 'right' or 'bottom'.
|
||||||
|
|
|
@ -1332,7 +1332,8 @@ impl ProjectPanel {
|
||||||
) -> AnyElement<Self> {
|
) -> AnyElement<Self> {
|
||||||
let kind = details.kind;
|
let kind = details.kind;
|
||||||
let path = details.path.clone();
|
let path = details.path.clone();
|
||||||
let padding = theme.container.padding.left + details.depth as f32 * theme.indent_width;
|
let settings = settings::get::<ProjectPanelSettings>(cx);
|
||||||
|
let padding = theme.container.padding.left + details.depth as f32 * settings.indent_size;
|
||||||
|
|
||||||
let entry_style = if details.is_cut {
|
let entry_style = if details.is_cut {
|
||||||
&theme.cut_entry
|
&theme.cut_entry
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue