Skip to content

Fix issue: 165: Disable Animations - #406

Merged
waffles-dev merged 4 commits into
winboat-org:mainfrom
enXov:fix-issue-165
Oct 25, 2025
Merged

waffles-dev merged 4 commits into
winboat-org:mainfrom
enXov:fix-issue-165

Conversation

@enXov

@enXov enXov commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

Description

This PR addresses issue #165 by adding a new configuration option to disable all animations in the GUI.

Changes Made

  • Added a new disableAnimations boolean configuration option in src/renderer/lib/config.ts
  • Created a new settings toggle in the Configuration view (src/renderer/views/Config.vue) under the "General Settings" section
  • Implemented CSS rules in src/renderer/App.vue that disable all animations and transitions when the setting is enabled
  • Added a polling mechanism to detect config changes and dynamically apply/remove the disable-animations class on the document body

Implementation Details

The feature works by:

  1. Adding a global CSS class (disable-animations) to the body element when the setting is enabled
  2. Using comprehensive CSS rules to disable all animations, transitions, and Vue transition components
  3. Polling the config every 100ms to detect changes (similar to the existing rerenderCounter pattern in the codebase)
  4. Cleaning up the interval on component unmount

Use Case

This feature is particularly useful for users experiencing poor GPU acceleration, where animations can cause performance issues or visual glitches.

Testing

  • ✅ Verified the toggle works correctly in the Configuration view
  • ✅ Confirmed all animations are disabled when the setting is enabled
  • ✅ Verified animations re-enable when the setting is toggled off
  • ✅ Checked that the setting persists across application restarts

Closes #165

@TibixDev

Copy link
Copy Markdown
Collaborator

Hey, good change thanks, could you use setIntervalImmediately and a timer of 1000ms? I think it's useless to poll every 100ms.

Comment thread src/renderer/App.vue
Comment thread src/renderer/views/Config.vue
enXov added 3 commits October 24, 2025 21:09
Fixed an issue where animations were disabled when the application
first launched, even though the 'Disable Animations' setting was
turned off in the config.

The problem occurred because the animation state check only ran when
there was a change in the setting. On first launch, since the value
remained false (animations enabled), the comparison would be:
  lastAnimationState (false) !== currentState (false) = false

This meant updateAnimationClass() was never called initially, leaving
animations disabled by default.

Solution: Initialize lastAnimationState as undefined instead of reading
from config. This ensures the first check always triggers:
  lastAnimationState (undefined) !== currentState (false) = true

Now animations are correctly enabled on first launch and can be toggled
by the user in settings as intended.

Resolves #165
@waffles-dev

Copy link
Copy Markdown
Collaborator

Happy with changes - thank you for making them

@waffles-dev
waffles-dev merged commit 2feb539 into winboat-org:main Oct 25, 2025
chevybowtie referenced this pull request in chevybowtie/dosboat Feb 15, 2026
* Fix issue: 165: Disable Animations

* refactor: use setIntervalImmediately with 1000ms timer for animation toggle

* refactor: simplify CSS and run prettier formatting

* fix: animations disabled on first launch despite setting being off

Fixed an issue where animations were disabled when the application
first launched, even though the 'Disable Animations' setting was
turned off in the config.

The problem occurred because the animation state check only ran when
there was a change in the setting. On first launch, since the value
remained false (animations enabled), the comparison would be:
  lastAnimationState (false) !== currentState (false) = false

This meant updateAnimationClass() was never called initially, leaving
animations disabled by default.

Solution: Initialize lastAnimationState as undefined instead of reading
from config. This ensures the first check always triggers:
  lastAnimationState (undefined) !== currentState (false) = true

Now animations are correctly enabled on first launch and can be toggled
by the user in settings as intended.

Resolves #165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Allow disabling animations

3 participants