fix(electron): pinned tab style (#8232)

fix PD-1687
This commit is contained in:
pengx17
2024-09-13 09:40:27 +00:00
parent 1d7932851e
commit 3c1cd6b648
2 changed files with 13 additions and 15 deletions

View File

@@ -237,7 +237,7 @@ const WorkbenchTab = ({
<Loading />
)}
</div>
{workbench.pinned || !view.title ? null : (
{!view.title ? null : (
<div
title={view.title}
className={styles.splitViewLabelText}
@@ -254,19 +254,17 @@ const WorkbenchTab = ({
</Fragment>
);
})}
{!workbench.pinned ? (
<div className={styles.tabCloseButtonWrapper}>
{tabsLength > 1 ? (
<button
data-testid="close-tab-button"
className={styles.tabCloseButton}
onClick={handleCloseTab}
>
<CloseIcon />
</button>
) : null}
</div>
) : null}
<div className={styles.tabCloseButtonWrapper}>
{tabsLength > 1 && !workbench.pinned ? (
<button
data-testid="close-tab-button"
className={styles.tabCloseButton}
onClick={handleCloseTab}
>
<CloseIcon />
</button>
) : null}
</div>
</div>
<div className={styles.dropIndicator} data-edge={closestEdge} />
</div>

View File

@@ -98,7 +98,7 @@ export const tab = style({
boxShadow: cssVar('buttonShadow'),
},
'&[data-pinned="true"]': {
flexShrink: 0,
maxWidth: 64,
},
[`${tabWrapper}[data-dragging="true"] &`]: {
boxShadow: `0 0 0 1px ${cssVar('primaryColor')}`,