Skip to content

Commit

Permalink
Markdown hover in status bar: not working without specified command (fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jun 22, 2021
1 parent c80fba9 commit 70c2130
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@
outline-width: 0px; /* do not render focus outline, we already have background */
}

.monaco-workbench .part.statusbar > .items-container > .statusbar-item > a:hover {
.monaco-workbench .part.statusbar > .items-container > .statusbar-item > a:hover:not(.disabled) {
text-decoration: none;
}

.monaco-workbench .part.statusbar > .items-container > .statusbar-item > a.disabled {
pointer-events: none;
cursor: default;
}

.monaco-workbench .part.statusbar > .items-container > .statusbar-item span.codicon {
Expand Down
14 changes: 7 additions & 7 deletions src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1036,27 +1036,27 @@ registerThemingParticipant((theme, collector) => {
if (theme.type !== ColorScheme.HIGH_CONTRAST) {
const statusBarItemHoverBackground = theme.getColor(STATUS_BAR_ITEM_HOVER_BACKGROUND);
if (statusBarItemHoverBackground) {
collector.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:hover { background-color: ${statusBarItemHoverBackground}; }`);
collector.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:focus { background-color: ${statusBarItemHoverBackground}; }`);
collector.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:hover:not(.disabled) { background-color: ${statusBarItemHoverBackground}; }`);
collector.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:focus:not(.disabled) { background-color: ${statusBarItemHoverBackground}; }`);
}

const statusBarItemActiveBackground = theme.getColor(STATUS_BAR_ITEM_ACTIVE_BACKGROUND);
if (statusBarItemActiveBackground) {
collector.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:active { background-color: ${statusBarItemActiveBackground}; }`);
collector.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:active:not(.disabled) { background-color: ${statusBarItemActiveBackground}; }`);
}
}

const activeContrastBorderColor = theme.getColor(activeContrastBorder);
if (activeContrastBorderColor) {
collector.addRule(`
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:focus,
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:active {
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:focus:not(.disabled),
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:active:not(.disabled) {
outline: 1px solid ${activeContrastBorderColor} !important;
outline-offset: -1px;
}
`);
collector.addRule(`
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:hover {
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:hover:not(.disabled) {
outline: 1px dashed ${activeContrastBorderColor};
outline-offset: -1px;
}
Expand All @@ -1075,7 +1075,7 @@ registerThemingParticipant((theme, collector) => {

const statusBarProminentItemHoverBackground = theme.getColor(STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND);
if (statusBarProminentItemHoverBackground) {
collector.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a.status-bar-info:hover { background-color: ${statusBarProminentItemHoverBackground}; }`);
collector.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a.status-bar-info:hover:not(.disabled) { background-color: ${statusBarProminentItemHoverBackground}; }`);
}
});

Expand Down

0 comments on commit 70c2130

Please sign in to comment.