diff --git a/src/components/navbar/ReaderNavBar.tsx b/src/components/navbar/ReaderNavBar.tsx index 06cc8c2d27..e8df957206 100644 --- a/src/components/navbar/ReaderNavBar.tsx +++ b/src/components/navbar/ReaderNavBar.tsx @@ -261,6 +261,7 @@ export default function ReaderNavBar(props: IProps) { showPageNumber={settings.showPageNumber} loadNextOnEnding={settings.loadNextOnEnding} skipDupChapters={settings.skipDupChapters} + fitPageToWindow={settings.fitPageToWindow} readerType={settings.readerType} /> diff --git a/src/components/reader/Page.tsx b/src/components/reader/Page.tsx index bede75ad9b..84c0dae612 100644 --- a/src/components/reader/Page.tsx +++ b/src/components/reader/Page.tsx @@ -30,6 +30,7 @@ function imageStyle(settings: IReaderSettings): any { }; }, []); if ( + settings.fitPageToWindow || settings.readerType === 'DoubleLTR' || settings.readerType === 'DoubleRTL' || settings.readerType === 'ContinuesHorizontalLTR' || diff --git a/src/components/reader/ReaderSettingsOptions.tsx b/src/components/reader/ReaderSettingsOptions.tsx index 6133938ef4..c17eaaedad 100644 --- a/src/components/reader/ReaderSettingsOptions.tsx +++ b/src/components/reader/ReaderSettingsOptions.tsx @@ -25,9 +25,16 @@ export default function ReaderSettingsOptions({ showPageNumber, skipDupChapters, setSettingValue, + fitPageToWindow, }: IProps) { const { t } = useTranslation(); - + const fitPageToWindowEligible = [ + 'ContinuesVertical', + 'Webtoon', + 'SingleVertical', + 'SingleRTL', + 'SingleLTR', + ].includes(readerType); return ( @@ -70,6 +77,18 @@ export default function ReaderSettingsOptions({ /> + {fitPageToWindowEligible ? ( + + + + setSettingValue('fitPageToWindow', e.target.checked)} + /> + + + ) : null}