TagSpaces is an offline, open source, document manager with tagging support
feat: improving entry selection in the row mode of the default perspective
Ilian Sapundshiev469ab4be27e0
diff --git a/app/perspectives/grid-perspective/components/CellContent.tsx b/app/perspectives/grid-perspective/components/CellContent.tsxindex 86f3bd8c8..be6233217 100644--- a/app/perspectives/grid-perspective/components/CellContent.tsx+++ b/app/perspectives/grid-perspective/components/CellContent.tsx@@ -212,7 +212,7 @@ const CellContent = (props: Props) => {);}- function renderRowCell() {+ function renderRowCell(selected: boolean) {let tmbSize = 85;if (entrySize === 'small') {tmbSize = 50;@@ -226,7 +226,9 @@ const CellContent = (props: Props) => {containerwrap="nowrap"style={{- backgroundColor: theme.palette.background.default+ backgroundColor: selected+ ? theme.palette.primary.light+ : theme.palette.background.default}}><Grid@@ -370,7 +372,7 @@ const CellContent = (props: Props) => {if (layoutType === 'grid') {gridCell = renderGridCell();} else if (layoutType === 'row') {- gridCell = renderRowCell();+ gridCell = renderRowCell(selected);}return (diff --git a/app/perspectives/grid-perspective/components/styles.css.tsx b/app/perspectives/grid-perspective/components/styles.css.tsxindex fd874a3de..13e2c6c31 100644--- a/app/perspectives/grid-perspective/components/styles.css.tsx+++ b/app/perspectives/grid-perspective/components/styles.css.tsx@@ -34,18 +34,15 @@ export default (theme: any): any => ({paddingBottom: 200},gridCell: {- // backgroundColor: theme.palette.background.paper,border: '2px solid transparent',margin: 2,marginBottom: 3,marginRight: 3- // maxWidth: 500},rowCell: {- // backgroundColor: theme.palette.background.paper,boxShadow: 'none',- borderLeft: '2px solid transparent',- borderRight: '2px solid transparent',+ borderLeft: '1px solid transparent',+ borderRight: '1px solid transparent',borderTop: '1px solid transparent',borderBottom: '1px solid ' + theme.palette.divider,margin: 0,@@ -57,9 +54,8 @@ export default (theme: any): any => ({backgroundColor: theme.palette.primary.light + ' !important'},selectedRowCell: {- // borderRadius: '4px',- border: '2px solid' + theme.palette.primary.main,- backgroundColor: theme.palette.primary.light + ' !important'+ borderRadius: '0px',+ border: '1px solid' + theme.palette.primary.main},gridCellThumb: {backgroundRepeat: 'no-repeat',@@ -94,7 +90,6 @@ export default (theme: any): any => ({minWidth: 40,height: 20,color: 'white',- // color: theme.palette.getContrastText(),borderRadius: 3,textAlign: 'center'},@@ -113,7 +108,6 @@ export default (theme: any): any => ({fontSize: 12,fontWeight: 'bold',borderRadius: 3,- // color: theme.palette.getContrastText(),textAlign: 'center',overflow: 'hidden',textOverflow: 'ellipsis'