Skip to content

Commit 70f3804

Browse files
authored
fix: improve active style and prevent the show of native contextMenu (#225)
* fix: prevent the show of native contextMenu in tab * fix: improve the active style of acitivity bar
1 parent 9f25dd5 commit 70f3804

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/components/tabs/tab.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export function Tab<T>(props: ITabProps) {
6161
const handleMouseOut = () => setHover(false);
6262
const handleOnContextMenu = useCallback(
6363
(event: React.MouseEvent) => {
64+
event.preventDefault();
6465
onContextMenu?.(event, props);
6566
},
6667
[props]

src/style/theme/activitybar.scss

+5-9
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,18 @@
1010
background: var(--activityBar-activeBorder);
1111
}
1212

13-
&__item--checked {
14-
#{$activityBar}__label {
15-
background-color: var(--activityBar-activeBackground);
16-
border-color: var(--activityBar-activeFocusBorder);
17-
color: var(--activityBar-activeBorder);
18-
}
19-
}
20-
2113
&__item {
2214
color: var(--activityBar-inactiveForeground);
2315

2416
&:hover,
25-
&__label .codicon {
17+
&__label {
2618
background-color: var(--activityBar-activeBackground);
2719
border-color: var(--activityBar-activeBorder);
2820
color: var(--activityBar-activeBorder);
2921
}
3022
}
23+
24+
&__item--checked {
25+
color: var(--activityBar-activeBorder);
26+
}
3127
}

0 commit comments

Comments
 (0)