Skip to content

Commit 8108fc5

Browse files
author
Benjamin Pasero
committed
1 parent bffbe2e commit 8108fc5

3 files changed

Lines changed: 24 additions & 6 deletions

File tree

src/vs/workbench/browser/parts/statusbar/media/statusbarpart.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@
1212
display: flex;
1313
}
1414

15+
.monaco-workbench .part.statusbar.status-border-top::after {
16+
content: '';
17+
position: absolute;
18+
top: 0;
19+
left: 0;
20+
z-index: 5;
21+
pointer-events: none;
22+
background-color: var(--status-border-top-color);
23+
}
24+
1525
.monaco-workbench .part.statusbar > .left-items,
1626
.monaco-workbench .part.statusbar > .right-items {
1727
display: flex;

src/vs/workbench/browser/parts/statusbar/statusbarPart.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,13 @@ export class StatusbarPart extends Part implements IStatusbarService {
580580

581581
// Border color
582582
const borderColor = this.getColor(this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY ? STATUS_BAR_BORDER : STATUS_BAR_NO_FOLDER_BORDER) || this.getColor(contrastBorder);
583-
container.style.borderTopWidth = borderColor ? '1px' : null;
584-
container.style.borderTopStyle = borderColor ? 'solid' : null;
585-
container.style.borderTopColor = borderColor;
583+
if (borderColor) {
584+
addClass(container, 'status-border-top');
585+
container.style.setProperty('--status-border-top-color', borderColor.toString());
586+
} else {
587+
removeClass(container, 'status-border-top');
588+
container.style.removeProperty('--status-border-top-color');
589+
}
586590

587591
// Notification Beak
588592
if (!this.styleElement) {

src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@ export class StatusBarColorProvider extends Themable implements IWorkbenchContri
7070

7171
// Border Color
7272
const borderColor = this.getColor(this.getColorKey(STATUS_BAR_NO_FOLDER_BORDER, STATUS_BAR_DEBUGGING_BORDER, STATUS_BAR_BORDER)) || this.getColor(contrastBorder);
73-
container.style.borderTopWidth = borderColor ? '1px' : null;
74-
container.style.borderTopStyle = borderColor ? 'solid' : null;
75-
container.style.borderTopColor = borderColor;
73+
if (borderColor) {
74+
addClass(container, 'status-border-top');
75+
container.style.setProperty('--status-border-top-color', borderColor.toString());
76+
} else {
77+
removeClass(container, 'status-border-top');
78+
container.style.removeProperty('--status-border-top-color');
79+
}
7680

7781
// Notification Beak
7882
if (!this.styleElement) {

0 commit comments

Comments
 (0)