- {content}
-
+ {content}
{processedContent ?? symbol.filepath}
diff --git a/gui/src/components/TabBar/TabBar.tsx b/gui/src/components/TabBar/TabBar.tsx
index 3b87a23c6..2fe905674 100644
--- a/gui/src/components/TabBar/TabBar.tsx
+++ b/gui/src/components/TabBar/TabBar.tsx
@@ -13,13 +13,25 @@ import {
} from "../../redux/slices/tabsSlice";
import { AppDispatch, RootState } from "../../redux/store";
import { loadSession, saveCurrentSession } from "../../redux/thunks/session";
+import { varWithFallback } from "../../styles/theme";
+
+// Haven't set up theme colors for tabs yet
+// Will keep it simple and choose from existing ones. Comments show vars we could use
+const tabBorderVar = varWithFallback("border"); // --vscode-tab-border
+const tabBackgroundVar = varWithFallback("background"); // --vscode-tab-inactiveBackground
+const tabForegroundVar = varWithFallback("foreground"); // --vscode-tab-inactiveForeground
+const tabHoverBackgroundVar = varWithFallback("list-hover"); // --vscode-tab-hoverBackground
+const tabHoverForegroundVar = varWithFallback("foreground"); // --vscode-tab-hoverForeground
+const tabSelectedBackgroundVar = varWithFallback("list-hover"); // --vscode-tab-activeBackground
+const tabSelectedForegroundVar = varWithFallback("list-active-foreground"); // --vscode-tab-activeForeground
+const tabAccentVar = varWithFallback("accent"); // --vscode-tab-activeBorderTop
const TabBarContainer = styled.div`
display: flex;
flex-wrap: wrap;
flex-shrink: 0;
flex-grow: 0;
- background-color: var(--vscode-tab-inactiveBackground);
+ background-color: ${tabBackgroundVar};
border-bottom: none;
position: relative;
margin-top: 2px;
@@ -41,24 +53,18 @@ const Tab = styled.div<{ isActive: boolean }>`
max-width: 150px;
height: 25px;
background-color: ${(props) =>
- props.isActive
- ? "var(--vscode-tab-activeBackground)"
- : "var(--vscode-tab-inactiveBackground)"};
+ props.isActive ? tabSelectedBackgroundVar : tabBackgroundVar};
color: ${(props) =>
- props.isActive
- ? "var(--vscode-tab-activeForeground)"
- : "var(--vscode-tab-inactiveForeground)"};
+ props.isActive ? tabSelectedForegroundVar : tabForegroundVar};
cursor: pointer;
- border: 1px solid var(--vscode-tab-border);
+ border: 1px solid ${tabBorderVar};
border-bottom: ${(props) =>
- props.isActive ? "none" : `1px solid var(--vscode-tab-border)`};
+ props.isActive ? "none" : `1px solid ${tabBorderVar}`};
user-select: none;
position: relative;
transition: background-color 0.2s;
border-top: ${(props) =>
- props.isActive
- ? `1px solid var(--vscode-tab-activeBorderTop, --vscode-tab-border)`
- : `1px solid var(--vscode-tab-border)`};
+ props.isActive ? `1px solid ${tabAccentVar}` : `1px solid ${tabBorderVar}`};
&:first-child {
border-left: none;
}
@@ -68,13 +74,9 @@ const Tab = styled.div<{ isActive: boolean }>`
&:hover {
background-color: ${(props) =>
- props.isActive
- ? "var(--vscode-tab-activeBackground)"
- : "var(--vscode-tab-hoverBackground)"};
+ props.isActive ? tabSelectedBackgroundVar : tabHoverBackgroundVar};
color: ${(props) =>
- props.isActive
- ? "var(--vscode-tab-activeForeground)"
- : "var(--vscode-tab-hoverForeground)"};
+ props.isActive ? tabSelectedForegroundVar : tabHoverForegroundVar};
}
`;
@@ -104,7 +106,7 @@ const CloseButton = styled.button`
&:hover {
opacity: 1;
- background-color: var(--vscode-tab-hoverBackground);
+ background-color: ${tabHoverBackgroundVar};
}
${Tab}:hover & {
@@ -119,33 +121,12 @@ const CloseButton = styled.button`
const TabBarSpace = styled.div`
flex: 1;
display: flex;
- border-bottom: 1px solid var(--vscode-tab-border);
- background-color: var(--vscode-tab-inactiveBackground);
-`;
-
-const NewTabButton = styled.button`
- display: flex;
- align-items: center;
- justify-content: center;
- width: 35px;
- height: 100%;
- border: none;
- background: transparent;
- color: var(--vscode-tab-inactiveForeground);
- cursor: pointer;
- opacity: 0.7;
- transition: opacity 0.2s;
-
- &:hover {
- opacity: 1;
- background-color: var(--vscode-tab-hoverBackground);
- color: var(--vscode-tab-hoverForeground);
- }
+ border-bottom: 1px solid ${tabBorderVar};
+ background-color: ${tabBackgroundVar};
`;
export function TabBar() {
const dispatch = useDispatchNormal text
+Description text
+Muted text
+