1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Chore: Regression: Revert changes made to the note list' height (#7823)

This commit is contained in:
Julien 2023-02-22 21:13:39 +08:00 committed by GitHub
parent 32bb256cca
commit 359448eb69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View File

@ -17,12 +17,13 @@ interface Props {
sortOrderField: string;
sortOrderReverse: boolean;
notesParentType: string;
height: number;
}
const StyledRoot = styled.div`
box-sizing: border-box;
height: ${(props: any) => props.height}px;
display: flex;
height: auto;
flex-direction: column;
padding: ${(props: any) => props.theme.mainPadding}px;
background-color: ${(props: any) => props.theme.backgroundColor3};

View File

@ -1,3 +1,4 @@
import { themeStyle } from '@joplin/lib/theme';
import * as React from 'react';
import { useMemo } from 'react';
import NoteList from '../NoteList/NoteList';
@ -20,16 +21,19 @@ const StyledRoot = styled.div`
`;
export default function NoteListWrapper(props: Props) {
const theme = themeStyle(props.themeId);
const controlHeight = theme.topRowHeight;
const noteListSize = useMemo(() => {
return {
width: props.size.width,
height: props.size.height,
height: props.size.height - controlHeight,
};
}, [props.size]);
}, [props.size, controlHeight]);
return (
<StyledRoot>
<NoteListControls />
<NoteListControls height={controlHeight}/>
<NoteList resizableLayoutEventEmitter={props.resizableLayoutEventEmitter} size={noteListSize} visible={props.visible}/>
</StyledRoot>
);

View File

@ -60,7 +60,7 @@ const globalStyle: any = {
toolbarPadding: 6,
appearance: 'light',
mainPadding: 12,
topRowHeight: 50,
topRowHeight: 81,
editorPaddingLeft: 8,
};