diff --git a/README.md b/README.md index 022a5c4f..fa706c53 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ A summary of the Git Graph extension settings are: * **Retain Context When Hidden**: Specifies if the Git Graph view Visual Studio Code context is kept when the panel is no longer visible (e.g. moved to background tab). Enabling this setting will make Git Graph load significantly faster when switching back to the Git Graph tab, however has a higher memory overhead. * **Show Status Bar Item**: Show a Status Bar Item that opens the Git Graph View when clicked. * **Source Code Provider Integration Location**: Specifies where the "View Git Graph" action appears on the title of SCM Providers. +* **Sticky Header**: Keeps the Graph View header (control bar and column headers) visible when the view is scrolled. * **Tab Icon Colour Theme**: Specifies the colour theme of the icon displayed on the Git Graph tab. This extension consumes the following settings: diff --git a/package.json b/package.json index 3d024431..849338db 100644 --- a/package.json +++ b/package.json @@ -1155,6 +1155,11 @@ "default": "Inline", "description": "Specifies where the \"View Git Graph\" action appears on the title of SCM Providers." }, + "git-graph.stickyHeader": { + "type": "boolean", + "default": true, + "description": "Keeps the Graph View header (control bar and column headers) visible when the view is scrolled." + }, "git-graph.tabIconColourTheme": { "type": "string", "enum": [ diff --git a/src/config.ts b/src/config.ts index 8d777ca8..76570bab 100644 --- a/src/config.ts +++ b/src/config.ts @@ -546,6 +546,13 @@ class Config { return !!this.config.get('showStatusBarItem', true); } + /** + * Get the value of the `git-graph.stickyHeader` Extension Setting. + */ + get stickyHeader() { + return !!this.config.get('stickyHeader', true); + } + /** * Get the value of the `git-graph.tabIconColourTheme` Extension Setting. */ diff --git a/src/gitGraphView.ts b/src/gitGraphView.ts index 1acba6ff..6430052c 100644 --- a/src/gitGraphView.ts +++ b/src/gitGraphView.ts @@ -692,7 +692,8 @@ export class GitGraphView extends Disposable { repoDropdownOrder: config.repoDropdownOrder, showRemoteBranches: config.showRemoteBranches, showStashes: config.showStashes, - showTags: config.showTags + showTags: config.showTags, + stickyHeader: config.stickyHeader }, lastActiveRepo: this.extensionState.getLastActiveRepo(), loadViewTo: this.loadViewTo, @@ -715,9 +716,10 @@ export class GitGraphView extends Disposable {
${UNABLE_TO_FIND_GIT_MSG}