mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
electron app: add an option to disable smooth scrolling
This commit is contained in:
parent
5d8f789791
commit
97aa00e18b
@ -1118,7 +1118,8 @@
|
|||||||
"title": "Performance",
|
"title": "Performance",
|
||||||
"enable-motion": "Enable transitions and animations",
|
"enable-motion": "Enable transitions and animations",
|
||||||
"enable-shadows": "Enable shadows",
|
"enable-shadows": "Enable shadows",
|
||||||
"enable-backdrop-effects": "Enable background effects for menus, popups and panels"
|
"enable-backdrop-effects": "Enable background effects for menus, popups and panels",
|
||||||
|
"enable-smooth-scroll": "Enable smooth scrolling"
|
||||||
},
|
},
|
||||||
"ai_llm": {
|
"ai_llm": {
|
||||||
"not_started": "Not started",
|
"not_started": "Not started",
|
||||||
|
@ -250,6 +250,7 @@ function Performance() {
|
|||||||
const [ motionEnabled, setMotionEnabled ] = useTriliumOptionBool("motionEnabled");
|
const [ motionEnabled, setMotionEnabled ] = useTriliumOptionBool("motionEnabled");
|
||||||
const [ shadowsEnabled, setShadowsEnabled ] = useTriliumOptionBool("shadowsEnabled");
|
const [ shadowsEnabled, setShadowsEnabled ] = useTriliumOptionBool("shadowsEnabled");
|
||||||
const [ backdropEffectsEnabled, setBackdropEffectsEnabled ] = useTriliumOptionBool("backdropEffectsEnabled");
|
const [ backdropEffectsEnabled, setBackdropEffectsEnabled ] = useTriliumOptionBool("backdropEffectsEnabled");
|
||||||
|
const [ smoothScrollEnabled, setSmoothScrollEnabled ] = useTriliumOptionBool("smoothScrollEnabled");
|
||||||
|
|
||||||
return <OptionsSection title={t("ui-performance.title")}>
|
return <OptionsSection title={t("ui-performance.title")}>
|
||||||
<FormCheckbox
|
<FormCheckbox
|
||||||
@ -266,6 +267,11 @@ function Performance() {
|
|||||||
label={t("ui-performance.enable-backdrop-effects")}
|
label={t("ui-performance.enable-backdrop-effects")}
|
||||||
currentValue={backdropEffectsEnabled} onChange={setBackdropEffectsEnabled}
|
currentValue={backdropEffectsEnabled} onChange={setBackdropEffectsEnabled}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<FormCheckbox
|
||||||
|
label={t("ui-performance.enable-smooth-scroll")}
|
||||||
|
currentValue={smoothScrollEnabled} onChange={setSmoothScrollEnabled}
|
||||||
|
/>
|
||||||
</OptionsSection>
|
</OptionsSection>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,12 @@ async function main() {
|
|||||||
// needed for excalidraw export https://github.com/zadam/trilium/issues/4271
|
// needed for excalidraw export https://github.com/zadam/trilium/issues/4271
|
||||||
electron.app.commandLine.appendSwitch("enable-experimental-web-platform-features");
|
electron.app.commandLine.appendSwitch("enable-experimental-web-platform-features");
|
||||||
electron.app.commandLine.appendSwitch("lang", options.getOptionOrNull("formattingLocale") ?? "en");
|
electron.app.commandLine.appendSwitch("lang", options.getOptionOrNull("formattingLocale") ?? "en");
|
||||||
|
|
||||||
|
// Disable smooth scroll if the option is set
|
||||||
|
const smoothScrollEnabled = options.getOptionOrNull("smoothScrollEnabled");
|
||||||
|
if (smoothScrollEnabled === "false") {
|
||||||
|
electron.app.commandLine.appendSwitch("disable-smooth-scrolling");
|
||||||
|
}
|
||||||
|
|
||||||
// Electron 36 crashes with "Using GTK 2/3 and GTK 4 in the same process is not supported" on some distributions.
|
// Electron 36 crashes with "Using GTK 2/3 and GTK 4 in the same process is not supported" on some distributions.
|
||||||
// See https://github.com/electron/electron/issues/46538 for more info.
|
// See https://github.com/electron/electron/issues/46538 for more info.
|
||||||
|
@ -65,6 +65,7 @@ const ALLOWED_OPTIONS = new Set<OptionNames>([
|
|||||||
"monthlyBackupEnabled",
|
"monthlyBackupEnabled",
|
||||||
"motionEnabled",
|
"motionEnabled",
|
||||||
"shadowsEnabled",
|
"shadowsEnabled",
|
||||||
|
"smoothScrollEnabled",
|
||||||
"backdropEffectsEnabled",
|
"backdropEffectsEnabled",
|
||||||
"maxContentWidth",
|
"maxContentWidth",
|
||||||
"compressImages",
|
"compressImages",
|
||||||
|
@ -155,7 +155,7 @@ const defaultOptions: DefaultOption[] = [
|
|||||||
{ name: "motionEnabled", value: "true", isSynced: false },
|
{ name: "motionEnabled", value: "true", isSynced: false },
|
||||||
{ name: "shadowsEnabled", value: "true", isSynced: false },
|
{ name: "shadowsEnabled", value: "true", isSynced: false },
|
||||||
{ name: "backdropEffectsEnabled", value: "true", isSynced: false },
|
{ name: "backdropEffectsEnabled", value: "true", isSynced: false },
|
||||||
|
{ name: "smoothScrollEnabled", value: "true", isSynced: false },
|
||||||
|
|
||||||
// Internationalization
|
// Internationalization
|
||||||
{ name: "locale", value: "en", isSynced: true },
|
{ name: "locale", value: "en", isSynced: true },
|
||||||
|
@ -96,6 +96,7 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
|
|||||||
motionEnabled: boolean;
|
motionEnabled: boolean;
|
||||||
shadowsEnabled: boolean;
|
shadowsEnabled: boolean;
|
||||||
backdropEffectsEnabled: boolean;
|
backdropEffectsEnabled: boolean;
|
||||||
|
smoothScrollEnabled: boolean;
|
||||||
codeNoteTheme: string;
|
codeNoteTheme: string;
|
||||||
|
|
||||||
initialized: boolean;
|
initialized: boolean;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user