Compare commits

..

2 Commits

3 changed files with 5 additions and 4 deletions

View File

@ -72,7 +72,7 @@
"fullscreen": false, "fullscreen": false,
"resizable": true, "resizable": true,
"title": "漫画阅读器", "title": "漫画阅读器",
"width": 1000, "width": 1200,
"height": 800 "height": 800
} }
] ]

View File

@ -33,7 +33,8 @@ export const NavMenu: FC = () => {
return ( return (
<Stack <Stack
spacing={8} spacing={8}
miw={220} w={300}
mw={200}
h="inherit" h="inherit"
sx={theme => ({ sx={theme => ({
flexGrow: 1, flexGrow: 1,

View File

@ -20,7 +20,7 @@ export const ContinuationView: FC = () => {
}, },
[files] [files]
); );
const maxImageWidth = useMemo(() => viewWidth * (zoom / 100), [viewWidth, zoom]); const maxImageWidth = useMemo(() => Math.floor(viewWidth * (zoom / 100)), [viewWidth, zoom]);
useEffect(() => { useEffect(() => {
ebus?.addListener('navigate_offset', ({ filename }) => { ebus?.addListener('navigate_offset', ({ filename }) => {
@ -59,7 +59,7 @@ export const ContinuationView: FC = () => {
justifyContent: 'center', justifyContent: 'center',
alignItems: 'flex-start', alignItems: 'flex-start',
width: '100%', width: '100%',
height: files[index].height * (maxImageWidth / files[index].width) height: Math.round(files[index].height * (maxImageWidth / files[index].width))
}} }}
> >
<img src={files[index].path} style={{ width: maxImageWidth }} /> <img src={files[index].path} style={{ width: maxImageWidth }} />