Skip to content

Commit 506f72a

Browse files
authored
SCM - another attempt to fix focus border when action is disabled (microsoft#199519)
1 parent 2d18058 commit 506f72a

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,6 @@
309309
display: none;
310310
}
311311

312-
.scm-view .scm-input .scm-editor .scm-editor-toolbar.disabled .action-item {
313-
cursor: default;
314-
}
315-
316-
.scm-view .scm-input .scm-editor .scm-editor-toolbar.disabled .action-label:hover,
317-
.scm-view .scm-input .scm-editor .scm-editor-toolbar.disabled .action-item.monaco-dropdown-with-primary:hover {
318-
background-color: unset;
319-
}
320-
321312
.scm-view .scm-input .scm-editor .scm-editor-toolbar.scroll-decoration {
322313
box-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;
323314
}

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,12 +1883,16 @@ class SCMInputWidgetToolbar extends WorkbenchToolBar {
18831883
primaryAction = actions.find(a => a.id === lastActionId) ?? actions[0];
18841884
}
18851885

1886+
if (primaryAction &&
1887+
primaryAction.id !== SCMInputCommandId.CancelAction &&
1888+
contextKeyService.getContextKeyValue(SCMInputContextKeys.ActionIsEnabled.key) === false) {
1889+
primaryAction.enabled = false;
1890+
}
1891+
18861892
this._ctxActionCount.set(actions.length);
18871893
this._dropdownActions = actions.length === 1 ? [] : actions;
18881894

18891895
container.classList.toggle('has-no-actions', actions.length === 0);
1890-
container.classList.toggle('disabled', contextKeyService.getContextKeyValue(SCMInputContextKeys.ActionIsEnabled.key) !== true);
1891-
18921896
super.setActions(primaryAction ? [primaryAction] : [], []);
18931897
};
18941898

0 commit comments

Comments
 (0)