@@ -113,6 +113,7 @@ function createScopedContextKeyService(contextKeyService: IContextKeyService, wi
113113export const multiSelectModifierSettingKey = 'workbench.list.multiSelectModifier' ;
114114export const openModeSettingKey = 'workbench.list.openMode' ;
115115export const horizontalScrollingKey = 'workbench.tree.horizontalScrolling' ;
116+ const treeIndentKey = 'workbench.tree.indent' ;
116117
117118function useAltAsMultipleSelectionModifier ( configurationService : IConfigurationService ) : boolean {
118119 return configurationService . getValue ( multiSelectModifierSettingKey ) === 'alt' ;
@@ -908,7 +909,8 @@ export class WorkbenchObjectTree<T extends NonNullable<any>, TFilterData = void>
908909 keyboardSupport : false ,
909910 styleController : new DefaultStyleController ( getSharedListStyleSheet ( ) ) ,
910911 ...computeStyles ( themeService . getTheme ( ) , defaultListStyles ) ,
911- ...toWorkbenchListOptions ( options , configurationService , keybindingService )
912+ ...toWorkbenchListOptions ( options , configurationService , keybindingService ) ,
913+ indent : configurationService . getValue ( treeIndentKey )
912914 } ) ;
913915
914916 this . contextKeyService = createScopedContextKeyService ( contextKeyService , this ) ;
@@ -944,6 +946,10 @@ export class WorkbenchObjectTree<T extends NonNullable<any>, TFilterData = void>
944946 if ( e . affectsConfiguration ( multiSelectModifierSettingKey ) ) {
945947 this . _useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier ( configurationService ) ;
946948 }
949+ if ( e . affectsConfiguration ( treeIndentKey ) ) {
950+ const indent = configurationService . getValue < number > ( treeIndentKey ) ;
951+ this . updateOptions ( { indent } ) ;
952+ }
947953 } )
948954 ) ;
949955 }
@@ -1055,7 +1061,8 @@ export class WorkbenchAsyncDataTree<TInput, T, TFilterData = void> extends Async
10551061 keyboardSupport : false ,
10561062 styleController : new DefaultStyleController ( getSharedListStyleSheet ( ) ) ,
10571063 ...computeStyles ( themeService . getTheme ( ) , defaultListStyles ) ,
1058- ...toWorkbenchListOptions ( options , configurationService , keybindingService )
1064+ ...toWorkbenchListOptions ( options , configurationService , keybindingService ) ,
1065+ indent : configurationService . getValue < number > ( treeIndentKey )
10591066 } ) ;
10601067
10611068 this . contextKeyService = createScopedContextKeyService ( contextKeyService , this ) ;
@@ -1091,6 +1098,10 @@ export class WorkbenchAsyncDataTree<TInput, T, TFilterData = void> extends Async
10911098 if ( e . affectsConfiguration ( multiSelectModifierSettingKey ) ) {
10921099 this . _useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier ( configurationService ) ;
10931100 }
1101+ if ( e . affectsConfiguration ( treeIndentKey ) ) {
1102+ const indent = configurationService . getValue < number > ( treeIndentKey ) ;
1103+ this . updateOptions ( { indent } ) ;
1104+ }
10941105 } )
10951106 ) ;
10961107 }
@@ -1137,6 +1148,11 @@ configurationRegistry.registerConfiguration({
11371148 'type' : 'boolean' ,
11381149 'default' : false ,
11391150 'description' : localize ( 'horizontalScrolling setting' , "Controls whether trees support horizontal scrolling in the workbench." )
1151+ } ,
1152+ [ treeIndentKey ] : {
1153+ 'type' : 'number' ,
1154+ 'default' : 8 ,
1155+ 'description' : localize ( 'tree indent setting' , "Controls tree indentation in pixels." )
11401156 }
11411157 }
11421158} ) ;
0 commit comments