diff --git a/qt/aqt/data/web/css/webview.scss b/qt/aqt/data/web/css/webview.scss index dd954efee..44e95d433 100644 --- a/qt/aqt/data/web/css/webview.scss +++ b/qt/aqt/data/web/css/webview.scss @@ -22,8 +22,8 @@ body { &:not(.isMac) * { @include scrollbar.custom; } - &.reduced-motion, - &.reduced-motion * { + &.reduce-motion, + &.reduce-motion * { transition: none !important; animation: none !important; } diff --git a/qt/aqt/profiles.py b/qt/aqt/profiles.py index 6cb53b5b2..8621b22bb 100644 --- a/qt/aqt/profiles.py +++ b/qt/aqt/profiles.py @@ -518,11 +518,11 @@ create table if not exists profiles def setUiScale(self, scale: float) -> None: self.meta["uiScale"] = scale - def reduced_motion(self) -> bool: - return self.meta.get("reduced_motion", False) + def reduce_motion(self) -> bool: + return self.meta.get("reduce_motion", False) - def set_reduced_motion(self, on: bool) -> None: - self.meta["reduced_motion"] = on + def set_reduce_motion(self, on: bool) -> None: + self.meta["reduce_motion"] = on def collapse_toolbar(self) -> bool: return self.meta.get("collapse_toolbar", False) diff --git a/qt/aqt/theme.py b/qt/aqt/theme.py index 4ca47bd44..a3ed9f38f 100644 --- a/qt/aqt/theme.py +++ b/qt/aqt/theme.py @@ -174,8 +174,8 @@ class ThemeManager: classes.extend(["nightMode", "night_mode"]) if self.macos_dark_mode(): classes.append("macos-dark-mode") - if aqt.mw.pm.reduced_motion(): - classes.append("reduced-motion") + if aqt.mw.pm.reduce_motion(): + classes.append("reduce-motion") if qtmajor == 5 and qtminor < 15: classes.append("no-blur") return " ".join(classes) diff --git a/sass/base.scss b/sass/base.scss index fd8b0e148..09f689596 100644 --- a/sass/base.scss +++ b/sass/base.scss @@ -57,7 +57,7 @@ samp { unicode-bidi: normal !important; } -.reduced-motion * { +.reduce-motion * { transition: none !important; animation: none !important; } diff --git a/ts/components/Collapsible.svelte b/ts/components/Collapsible.svelte index 247a31ed2..b6fb6ad7e 100644 --- a/ts/components/Collapsible.svelte +++ b/ts/components/Collapsible.svelte @@ -9,7 +9,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export let collapse = false; export let toggleDisplay = false; - export let animated = !document.body.classList.contains("reduced-motion"); + export let animated = !document.body.classList.contains("reduce-motion"); let contentHeight = 0; diff --git a/ts/editor/PlainTextBadge.svelte b/ts/editor/PlainTextBadge.svelte index c190f75ef..a82f1f428 100644 --- a/ts/editor/PlainTextBadge.svelte +++ b/ts/editor/PlainTextBadge.svelte @@ -11,7 +11,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { context as editorFieldContext } from "./EditorField.svelte"; import { plainTextIcon } from "./icons"; - const animated = !document.body.classList.contains("reduced-motion"); + const animated = !document.body.classList.contains("reduce-motion"); const editorField = editorFieldContext.get(); const keyCombination = "Control+Shift+X"; diff --git a/ts/editor/RichTextBadge.svelte b/ts/editor/RichTextBadge.svelte index 280237648..2fce343d6 100644 --- a/ts/editor/RichTextBadge.svelte +++ b/ts/editor/RichTextBadge.svelte @@ -11,7 +11,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { context as editorFieldContext } from "./EditorField.svelte"; import { richTextIcon } from "./icons"; - const animated = !document.body.classList.contains("reduced-motion"); + const animated = !document.body.classList.contains("reduce-motion"); const editorField = editorFieldContext.get(); const keyCombination = "Control+Shift+X"; diff --git a/ts/editor/StickyBadge.svelte b/ts/editor/StickyBadge.svelte index c14793dc0..5790daa9e 100644 --- a/ts/editor/StickyBadge.svelte +++ b/ts/editor/StickyBadge.svelte @@ -12,7 +12,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { context as editorFieldContext } from "./EditorField.svelte"; import { stickyIcon } from "./icons"; - const animated = !document.body.classList.contains("reduced-motion"); + const animated = !document.body.classList.contains("reduce-motion"); export let active: boolean; export let show: boolean;