Skip to content

Commit 9a207df

Browse files
authored
SCM - adjust statistics badge border when item is selected/focused (#198367)
1 parent 881e54d commit 9a207df

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

build/lib/stylelint/vscode-known-variables.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@
501501
"--vscode-sash-hoverBorder",
502502
"--vscode-scm-historyItemAdditionsForeground",
503503
"--vscode-scm-historyItemDeletionsForeground",
504+
"--vscode-scm-historyItemSelectedStatisticsBorder",
504505
"--vscode-scm-historyItemStatisticsBorder",
505506
"--vscode-scrollbar-shadow",
506507
"--vscode-scrollbarSlider-activeBackground",

src/vs/workbench/contrib/scm/browser/media/scm.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@
164164
border: 1px solid var(--vscode-scm-historyItemStatisticsBorder);
165165
}
166166

167+
.scm-view .monaco-list-row.focused .history-item .stats-container,
168+
.scm-view .monaco-list-row.selected .history-item .stats-container {
169+
border: 1px solid var(--vscode-scm-historyItemSelectedStatisticsBorder);
170+
}
171+
167172
.scm-view .monaco-list-row .history-item .stats-container > .files-label,
168173
.scm-view .monaco-list-row .history-item .stats-container > .insertions-label,
169174
.scm-view .monaco-list-row .history-item .stats-container > .deletions-label {

src/vs/workbench/contrib/scm/browser/scmViewPane.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'
100100
import { EditOperation } from 'vs/editor/common/core/editOperation';
101101
import { stripIcons } from 'vs/base/common/iconLabels';
102102
import { IconLabel } from 'vs/base/browser/ui/iconLabel/iconLabel';
103-
import { registerColor, transparent } from 'vs/platform/theme/common/colorRegistry';
103+
import { foreground, listActiveSelectionForeground, registerColor, transparent } from 'vs/platform/theme/common/colorRegistry';
104104

105105
// type SCMResourceTreeNode = IResourceNode<ISCMResource, ISCMResourceGroup>;
106106
// type SCMHistoryItemChangeResourceTreeNode = IResourceNode<SCMHistoryItemChangeTreeElement, SCMHistoryItemTreeElement>;
@@ -132,12 +132,18 @@ registerColor('scm.historyItemDeletionsForeground', {
132132
}, localize('scm.historyItemDeletionsForeground', "History item deletions foreground color."));
133133

134134
registerColor('scm.historyItemStatisticsBorder', {
135-
dark: transparent('foreground', 0.1),
136-
light: transparent('foreground', 0.1),
137-
hcDark: transparent('foreground', 0.1),
138-
hcLight: transparent('foreground', 0.1)
135+
dark: transparent(foreground, 0.2),
136+
light: transparent(foreground, 0.2),
137+
hcDark: transparent(foreground, 0.2),
138+
hcLight: transparent(foreground, 0.2)
139139
}, localize('scm.historyItemStatisticsBorder', "History item statistics border color."));
140140

141+
registerColor('scm.historyItemSelectedStatisticsBorder', {
142+
dark: transparent(listActiveSelectionForeground, 0.2),
143+
light: transparent(listActiveSelectionForeground, 0.2),
144+
hcDark: transparent(listActiveSelectionForeground, 0.2),
145+
hcLight: transparent(listActiveSelectionForeground, 0.2)
146+
}, localize('scm.historyItemSelectedStatisticsBorder', "History item selected statistics border color."));
141147

142148
interface ISCMLayout {
143149
height: number | undefined;

0 commit comments

Comments
 (0)