diff --git a/src/features/project-tree/HeaderActions.tsx b/src/features/project-tree/HeaderActions.tsx index 81016a403d..2947f0f0bb 100644 --- a/src/features/project-tree/HeaderActions.tsx +++ b/src/features/project-tree/HeaderActions.tsx @@ -44,6 +44,7 @@ export const OPTION_LABELS: Array<[ToggleOption, string]> = [ ["showExcluded", "Show Excluded Files"], ["showMembers", "Show Members"], ["showRootPaths", "Show Root Paths"], + ["horizontalScroll", "Horizontal Scrolling"], ["compact", "Compact Middle Packages"], ["foldersFirst", "Sort Folders First"], ["autoscrollFromSource", "Always Select Opened File"], @@ -54,7 +55,7 @@ export const OPTION_LABELS: Array<[ToggleOption, string]> = [ ]; /** The first entries of OPTION_LABELS are Appearance options, the rest Behavior. */ -const APPEARANCE_OPTIONS = 6; +const APPEARANCE_OPTIONS = 7; /** Header controls of the Project tool window (IDEA: Locate, Expand/Collapse All). */ export function ProjectHeaderActions() { diff --git a/src/features/project-tree/ProjectView.tsx b/src/features/project-tree/ProjectView.tsx index fc20423ded..ea1279aa6f 100644 --- a/src/features/project-tree/ProjectView.tsx +++ b/src/features/project-tree/ProjectView.tsx @@ -907,7 +907,7 @@ export function ProjectView() { )} - horizontalScroll + horizontalScroll={options.horizontalScroll} aria-label="Project" focusContext="projectViewFocus" handleRef={setTreeHandle} diff --git a/src/features/project-tree/store.ts b/src/features/project-tree/store.ts index 536ada5105..d630c1e53a 100644 --- a/src/features/project-tree/store.ts +++ b/src/features/project-tree/store.ts @@ -63,6 +63,8 @@ export interface ViewOptions extends TreeOptions { showMembers: boolean; /** Show the location of each project root beside its name. */ showRootPaths: boolean; + /** Rows wider than the pane scroll sideways; off clips long names (VS Code's horizontal scrolling). */ + horizontalScroll: boolean; } export const DEFAULT_VIEW_OPTIONS: ViewOptions = { @@ -75,6 +77,7 @@ export const DEFAULT_VIEW_OPTIONS: ViewOptions = { previewTab: false, showMembers: false, showRootPaths: true, + horizontalScroll: true, }; function storedOptions(): ViewOptions { diff --git a/src/platform/locales/text/en.json b/src/platform/locales/text/en.json index 28cdd0dffb..bf86d1b87d 100644 --- a/src/platform/locales/text/en.json +++ b/src/platform/locales/text/en.json @@ -2632,5 +2632,6 @@ "Updated {n} branch": "Updated {n} branch", "Updated {n} branches": "Updated {n} branches", "No branches were updated": "No branches were updated", - "Selected branches are up-to-date": "Selected branches are up-to-date" + "Selected branches are up-to-date": "Selected branches are up-to-date", + "Horizontal Scrolling": "Horizontal Scrolling" } diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.json index 3ecee03fb8..128fb2cdb3 100644 --- a/src/platform/locales/text/zh.json +++ b/src/platform/locales/text/zh.json @@ -9011,5 +9011,6 @@ "Updated {n} branch": "已更新 {n} 个分支", "Updated {n} branches": "已更新 {n} 个分支", "No branches were updated": "没有分支被更新", - "Selected branches are up-to-date": "所选分支都是最新的" + "Selected branches are up-to-date": "所选分支都是最新的", + "Horizontal Scrolling": "横向滚动" }