Skip to content

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

design: adjusting search button

Ilian Sapundshievd77dafc142f0
diff --git a/src/renderer/components/FolderContainer.tsx b/src/renderer/components/FolderContainer.tsx
index f83325b83..d1b176256 100644
--- a/src/renderer/components/FolderContainer.tsx
+++ b/src/renderer/components/FolderContainer.tsx
@@ -314,45 +314,54 @@ function FolderContainer(props: Props) {
<>
<div
style={{
+ margin: '0 10px 0 10px',
flex: '1 1 1%',
display: 'flex',
flexDirection: 'column',
}}
- />
- {smallScreen ? (
- <TsIconButton
- tooltip={
- t('core:openSearch') + ' (' + openSearchKeyBinding + ')'
- }
- data-tid="toggleSearch"
- onClick={openSearchMode}
- style={
- {
- WebkitAppRegion: 'no-drag',
- } as React.CSSProperties & { WebkitAppRegion?: string }
- }
- >
- <SearchIcon />
- </TsIconButton>
- ) : (
- <TsButton
- data-tid="toggleSearch"
- onClick={openSearchMode}
- startIcon={<SearchIcon />}
- style={
- {
- marginRight: 5,
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- WebkitAppRegion: 'no-drag',
- } as React.CSSProperties & { WebkitAppRegion?: string }
- }
- >
- {t('core:searchTitle')}
- <span style={{ width: 10 }} />
- {openSearchKeyBinding}
- </TsButton>
- )}
+ >
+ {smallScreen ? (
+ <TsIconButton
+ tooltip={
+ t('core:openSearch') + ' (' + openSearchKeyBinding + ')'
+ }
+ data-tid="toggleSearch"
+ onClick={openSearchMode}
+ style={
+ {
+ maxWidth: 100,
+ WebkitAppRegion: 'no-drag',
+ } as React.CSSProperties & { WebkitAppRegion?: string }
+ }
+ >
+ <SearchIcon />
+ </TsIconButton>
+ ) : (
+ <TsButton
+ data-tid="toggleSearch"
+ onClick={openSearchMode}
+ color="secondary"
+ startIcon={<SearchIcon />}
+ style={
+ {
+ marginTop: -2,
+ marginRight: 5,
+ minWidth: 100,
+ width: 'stretch',
+ maxWidth: 300,
+ margin: '0 auto',
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ WebkitAppRegion: 'no-drag',
+ } as React.CSSProperties & { WebkitAppRegion?: string }
+ }
+ >
+ {t('core:searchTitle')}
+ <span style={{ width: 10 }} />
+ {openSearchKeyBinding}
+ </TsButton>
+ )}
+ </div>
{progress?.length > 0 && (
<TsIconButton
diff --git a/src/renderer/containers/App.tsx b/src/renderer/containers/App.tsx
index 34414350e..bffd9f2a2 100644
--- a/src/renderer/containers/App.tsx
+++ b/src/renderer/containers/App.tsx
@@ -28,9 +28,9 @@ import {
createTheme,
} from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
+import { useEffect } from 'react';
import { I18nextProvider, useTranslation } from 'react-i18next'; // as we build ourself via webpack
import { useSelector } from 'react-redux';
-import { useEffect } from 'react';
declare module '@mui/material/styles' {
interface Theme extends Record<string, any> {
@@ -47,7 +47,7 @@ const legacyTheme = createTheme({
dark: AppConfig.lightThemeMainColor,
},
secondary: {
- main: AppConfig.lightThemeMainColor,
+ main: '#777',
},
divider: '#ddd',
},
@@ -62,7 +62,7 @@ const newlightTheme = createTheme({
dark: '#3bc8ff',
},
secondary: {
- main: '#3bc8ff',
+ main: '#777',
},
divider: '#ddd',
},
@@ -79,7 +79,7 @@ const darklegacyTheme = createTheme({
dark: AppConfig.darkThemeMainColor,
},
secondary: {
- main: AppConfig.darkThemeMainColor,
+ main: '#bbb',
},
divider: '#555',
},
@@ -94,7 +94,7 @@ const darkblueTheme = createTheme({
dark: '#3bc8ff',
},
secondary: {
- main: '#3bc8ff',
+ main: '#bbb',
},
background: {
default: '#001E3C',
@@ -112,7 +112,7 @@ const draculaTheme = createTheme({
dark: '#BD93F9',
},
secondary: {
- main: '#BD93F9',
+ main: '#bbb',
},
divider: '#555',
background: {