Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: improving design of the entry container tabs

Ilian Sapundshiev28e2bc15d9e8
diff --git a/src/renderer/components/EntryContainer.tsx b/src/renderer/components/EntryContainer.tsx
index d0c2d61a9..8d6528361 100644
--- a/src/renderer/components/EntryContainer.tsx
+++ b/src/renderer/components/EntryContainer.tsx
@@ -528,6 +528,7 @@ function EntryContainer() {
data-tid="autoSaveTID"
checked={openedEntry.meta && openedEntry.meta.autoSave}
onChange={toggleAutoSave}
+ size={desktopMode ? 'small' : 'medium'}
name="autoSave"
/>
</Tooltip>
@@ -626,17 +627,20 @@ function EntryContainer() {
{tabsComponent()}
<div
style={{
- zIndex: 1,
+ zIndex: 1000,
position: 'absolute',
right: 10,
- top: 8,
+ top: 0,
backgroundColor: theme.palette.background.default,
+ // backgroundColor: 'transparent',
display: 'flex',
alignItems: 'center',
+ flexDirection: 'column',
+ borderRadius: AppConfig.defaultCSSRadius,
}}
>
- {autoSave}
{editFile}
+ {autoSave}
</div>
</div>
);
diff --git a/src/renderer/components/EntryContainerTabs.tsx b/src/renderer/components/EntryContainerTabs.tsx
index efcc95e64..8942d91c9 100644
--- a/src/renderer/components/EntryContainerTabs.tsx
+++ b/src/renderer/components/EntryContainerTabs.tsx
@@ -181,14 +181,17 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
{/* <Box sx={{ ...(marginRight && { marginRight }) }}> */}
<Box
style={{
- marginRight: 160,
+ marginRight: 140,
// borderBottom: '1px solid ' + theme.palette.divider,
}}
>
<Tabs
value={selectedTabIndex}
onChange={handleChange}
+ variant="scrollable"
+ scrollButtons={false}
aria-label="Switching among description, revisions entry properties"
+ slotProps={{ indicator: { sx: { maxWidth: 85 } } }}
>
{tabsArray.current.map((tab, index) => (
<Tab
@@ -197,15 +200,21 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
// @ts-ignore
icon={tab.icon}
label={tab.title}
- sx={{
+ style={{
+ paddingLeft: 0,
+ paddingRight: 0,
fontSize: 12,
fontWeight: 'normal',
textTransform: 'none',
paddingTop: '0px',
paddingBottom: '0px',
minHeight: '60px', // 68px
+ marginLeft: -8,
+ marginRight: -8,
}}
- {...a11yProps(index)}
+ // sx={{ maxWidth: 70 }}
+ id={`tab-${index}`}
+ ariaControls={`simple-tabpanel-${index}`}
onClick={() => handleTabClick(selectedTabIndex, index)}
/>
))}