Rename "reader scrollbar state" properties
This commit is contained in:
@@ -86,7 +86,7 @@ const BaseReaderPage = ({
|
||||
const { src } = props;
|
||||
|
||||
const isTabletWidth = MediaQuery.useIsTabletWidth();
|
||||
const { scrollbarXSize, scrollbarYSize } = useReaderStoreShallow((state) => state.scrollbar);
|
||||
const scrollbar = useReaderStoreShallow((state) => state.scrollbar);
|
||||
|
||||
const handleLoad = useCallback(
|
||||
() => onLoad?.(pagesIndex, src, isPrimaryPage),
|
||||
@@ -114,8 +114,8 @@ const BaseReaderPage = ({
|
||||
shouldStretchPage,
|
||||
pageScaleMode,
|
||||
readerWidth,
|
||||
readerNavBarWidth + scrollbarYSize,
|
||||
scrollbarXSize,
|
||||
readerNavBarWidth + scrollbar.ySize,
|
||||
scrollbar.xSize,
|
||||
doublePage,
|
||||
isTabletWidth,
|
||||
),
|
||||
@@ -131,8 +131,8 @@ const BaseReaderPage = ({
|
||||
pageScaleMode,
|
||||
doublePage,
|
||||
readerWidth,
|
||||
readerNavBarWidth + scrollbarYSize,
|
||||
scrollbarXSize,
|
||||
readerNavBarWidth + scrollbar.ySize,
|
||||
scrollbar.xSize,
|
||||
),
|
||||
filter: getCustomFilterString(customFilter),
|
||||
objectFit: 'contain',
|
||||
|
||||
@@ -107,7 +107,7 @@ const BaseReaderTransitionPage = ({
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const manga = useReaderStoreShallow((state) => state.manga);
|
||||
const { scrollbarXSize, scrollbarYSize } = useReaderStoreShallow((state) => state.scrollbar);
|
||||
const scrollbar = useReaderStoreShallow((state) => state.scrollbar);
|
||||
|
||||
const isPreviousType = type === ReaderTransitionPageMode.PREVIOUS;
|
||||
const isNextType = type === ReaderTransitionPageMode.NEXT;
|
||||
@@ -141,13 +141,13 @@ const BaseReaderTransitionPage = ({
|
||||
position: 'sticky',
|
||||
...applyStyles(isContinuousVerticalReadingMode(readingMode), {
|
||||
left: 0,
|
||||
maxWidth: `calc(100vw - ${scrollbarYSize}px - ${readerNavBarWidth}px)`,
|
||||
minHeight: `calc(100vh - ${scrollbarXSize}px)`,
|
||||
maxWidth: `calc(100vw - ${scrollbar.ySize}px - ${readerNavBarWidth}px)`,
|
||||
minHeight: `calc(100vh - ${scrollbar.xSize}px)`,
|
||||
}),
|
||||
...applyStyles(readingMode === ReadingMode.CONTINUOUS_HORIZONTAL, {
|
||||
top: 0,
|
||||
minWidth: `calc(100vw - ${scrollbarYSize}px - ${readerNavBarWidth}px)`,
|
||||
maxHeight: `calc(100vh - ${scrollbarXSize}px)`,
|
||||
minWidth: `calc(100vw - ${scrollbar.ySize}px - ${readerNavBarWidth}px)`,
|
||||
maxHeight: `calc(100vh - ${scrollbar.xSize}px)`,
|
||||
}),
|
||||
}),
|
||||
}}
|
||||
@@ -157,8 +157,8 @@ const BaseReaderTransitionPage = ({
|
||||
gap: 2,
|
||||
maxWidth: (theme) =>
|
||||
// spacing = added padding left + right
|
||||
`calc(100vw - ${scrollbarYSize}px - ${readerNavBarWidth}px - ${theme.spacing(2)})`,
|
||||
maxHeight: `calc(100vh - ${scrollbarXSize}px)`,
|
||||
`calc(100vw - ${scrollbar.ySize}px - ${readerNavBarWidth}px - ${theme.spacing(2)})`,
|
||||
maxHeight: `calc(100vh - ${scrollbar.xSize}px)`,
|
||||
width: 'max-content',
|
||||
p: 1,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user