Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,20 @@
"default": "rounded",
"description": "Specifies the style of the graph."
},
"git-graph.graph.fontSize": {
"type": "integer",
"minimum": 8,
"maximum": 24,
"default": 13,
"description": "Specifies the font size (in pixels) of the text in the commit table."
},
"git-graph.graph.rowHeight": {
"type": "integer",
"minimum": 16,
"maximum": 48,
"default": 24,
"description": "Specifies the height (in pixels) of each row in the commit table."
},
"git-graph.graph.uncommittedChanges": {
"type": "string",
"enum": [
Expand Down
4 changes: 3 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ class Config {
style: this.getRenamedExtensionSetting<string>('graph.style', 'graphStyle', 'rounded') === 'angular'
? GraphStyle.Angular
: GraphStyle.Rounded,
grid: { x: 16, y: 24, offsetX: 16, offsetY: 12, expandY: 250 },
fontSize: this.config.get<number>('graph.fontSize', 13),
rowHeight: this.config.get<number>('graph.rowHeight', 24),
grid: { x: 16, y: this.config.get<number>('graph.rowHeight', 24), offsetX: 16, offsetY: this.config.get<number>('graph.rowHeight', 24) / 2, expandY: 250 },
uncommittedChanges: this.config.get<string>('graph.uncommittedChanges', 'Open Circle at the Uncommitted Changes') === 'Open Circle at the Checked Out Commit'
? GraphUncommittedChangesStyle.OpenCircleAtTheCheckedOutCommit
: GraphUncommittedChangesStyle.OpenCircleAtTheUncommittedChanges
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ export interface CommitDetailsViewConfig {

export interface GraphConfig {
readonly colours: ReadonlyArray<string>;
readonly fontSize: number;
readonly rowHeight: number;
readonly style: GraphStyle;
readonly grid: { x: number, y: number, offsetX: number, offsetY: number, expandY: number };
readonly uncommittedChanges: GraphUncommittedChangesStyle;
Expand Down
4 changes: 3 additions & 1 deletion web/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// The authenticity of host 'github.pie.apple.com (17.121.132.15)' can't be established.
// ECDSA key fingerprint is SHA256:7ZIubzLSVVGGQ2BgrPF+QnkDYjuJ/xs754ZS8oAZ7QY.
// This key is not known by any other names.
// Are you sure you want to continue connecting (yes/no/[fingerprint])?
// Are you sure you want to continue connecting (yes/no/[fingerprint])?
class GitGraphView {
private gitRepos: GG.GitRepoSet;
private gitBranches: ReadonlyArray<string> = [];
Expand Down Expand Up @@ -139,6 +139,8 @@ class GitGraphView {

alterClass(document.body, CLASS_BRANCH_LABELS_ALIGNED_TO_GRAPH, this.config.referenceLabels.branchLabelsAlignedToGraph);
alterClass(document.body, CLASS_TAG_LABELS_RIGHT_ALIGNED, this.config.referenceLabels.tagLabelsOnRight);
document.body.style.setProperty('--git-graph-fontSize', this.config.graph.fontSize + 'px');
document.body.style.setProperty('--git-graph-rowHeight', this.config.graph.rowHeight + 'px');

this.observeWindowSizeChanges();
this.observeWebviewStyleChanges();
Expand Down
4 changes: 2 additions & 2 deletions web/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ code{
}
#commitTable th, #commitTable td{
white-space:nowrap;
font-size:13px;
font-size:var(--git-graph-fontSize, 13px);
cursor:default;
text-overflow:ellipsis;
overflow:hidden;
}
#commitTable td{
line-height:24px;
line-height:var(--git-graph-rowHeight, 24px);
padding:0 4px;
}
#commitTable th{
Expand Down