Skip to content

Commit 0211ebc

Browse files
committed
adjust colors if list.hover is the same as sidebar.back
1 parent b1dc80a commit 0211ebc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/components/src/utils/polyfill-theme.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,22 @@ const polyfillTheme = vsCodeTheme => {
121121
);
122122
}
123123

124+
if (uiColors.list.hoverBackground === uiColors.sideBar.background) {
125+
if (
126+
uiColors.list.inactiveSelectionBackground &&
127+
uiColors.list.hoverBackground !==
128+
uiColors.list.inactiveSelectionBackground
129+
) {
130+
uiColors.list.hoverBackground = uiColors.list.inactiveSelectionBackground;
131+
} else {
132+
// if that didnt work, its math time
133+
uiColors.list.hoverBackground = decreaseContrast(
134+
uiColors.sideBar.background,
135+
0.25
136+
);
137+
}
138+
}
139+
124140
uiColors.list.foreground = uiColors.list.foreground || mutedForeground;
125141
uiColors.list.hoverForeground =
126142
uiColors.list.hoverForeground || uiColors.sideBar.foreground;

0 commit comments

Comments
 (0)