settings: add option to disable auto check updates (#279)

This commit is contained in:
Huang Xin
2025-02-01 13:45:55 +01:00
committed by GitHub
parent 44885f2901
commit 6889d6341f
26 changed files with 131 additions and 37 deletions
+5 -1
View File
@@ -8,6 +8,7 @@ import { ViewSettings } from '@/types/book';
import { Palette } from '@/styles/themes';
import fontfacesCSS from '!!raw-loader!../styles/fonts.css';
import { getOSPlatform } from './misc';
const getFontStyles = (
serif: string,
@@ -209,12 +210,15 @@ export const getStyles = (viewSettings: ViewSettings, themeCode: ThemeCode) => {
themeCode.fg,
themeCode.primary,
);
// scale the font size on-the-fly so that we can sync the same font size on different devices
const isMobile = ['ios', 'android'].includes(getOSPlatform());
const fontScale = isMobile ? 1.25 : 1;
const fontStyles = getFontStyles(
viewSettings.serifFont!,
viewSettings.sansSerifFont!,
viewSettings.monospaceFont!,
viewSettings.defaultFont!,
viewSettings.defaultFontSize!,
viewSettings.defaultFontSize! * fontScale,
viewSettings.overrideFont!,
);
const userStylesheet = viewSettings.userStylesheet!;