Skip to content

Commit

Permalink
fix: improve active style and prevent the show of native contextMenu (#…
Browse files Browse the repository at this point in the history
…225)

* fix: prevent the show of native contextMenu in tab

* fix: improve the active style of acitivity bar
  • Loading branch information
mortalYoung authored Jul 7, 2021
1 parent 9f25dd5 commit 70f3804
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/components/tabs/tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export function Tab<T>(props: ITabProps) {
const handleMouseOut = () => setHover(false);
const handleOnContextMenu = useCallback(
(event: React.MouseEvent) => {
event.preventDefault();
onContextMenu?.(event, props);
},
[props]
Expand Down
14 changes: 5 additions & 9 deletions src/style/theme/activitybar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,18 @@
background: var(--activityBar-activeBorder);
}

&__item--checked {
#{$activityBar}__label {
background-color: var(--activityBar-activeBackground);
border-color: var(--activityBar-activeFocusBorder);
color: var(--activityBar-activeBorder);
}
}

&__item {
color: var(--activityBar-inactiveForeground);

&:hover,
&__label .codicon {
&__label {
background-color: var(--activityBar-activeBackground);
border-color: var(--activityBar-activeBorder);
color: var(--activityBar-activeBorder);
}
}

&__item--checked {
color: var(--activityBar-activeBorder);
}
}

0 comments on commit 70f3804

Please sign in to comment.