Skip to content

feat: Unified Global Animation Engine & Live Configuration#78

Merged
Brainitech merged 4 commits into
devfrom
feat/Animations
Jun 21, 2026
Merged

feat: Unified Global Animation Engine & Live Configuration#78
Brainitech merged 4 commits into
devfrom
feat/Animations

Conversation

@Brainitech

Copy link
Copy Markdown
Owner

Overview

This PR introduces a massive overhaul to the shell's animation and transition architecture. It replaces hard-coded, disconnected bindings with a centralized, efficient Anim singleton engine, and introduces a robust live-reloading configuration system.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (causes existing functionality to not work as expected)

Key Changes

  • Live Configuration Engine: Created animation_prefs.json and tied it to a Quickshell FileView. Modifying "style", "speed_multiplier", or "curve" inside the JSON instantly updates the entire shell without needing a reboot.
  • Global Speed & Curve Modifiers: Introduced a single speed_multiplier that dynamically scales all UI and transition speeds proportionally. Added a curated curve property to instantly change the "physics" of the shell (smooth, spring, cinematic, linear).
  • Single-Slide State Machine: Extensively refactored Dashboard, AudioControl, NetworkPopup, and ClockCard to eliminate the glitchy animIdx system. They now use a streamlined isCurrent/wasCurrent engine that natively supports custom transitions like Parallax opacity cross-fading
  • Synchronized Dashboard Transitions: Solved the Dashboard.qml resizing visual overlap glitch. Replaced decoupled slide animations with a singular, synchronized transitionProgress cycle, preventing any gaps or overlaps when jumping between tabs of varying widths.
  • Reference Bug Fixes: Eliminated ReferenceErrors across QML files by enforcing explicit component ID bindings in onRunningChanged blocks and fixing versionless Qt6 Quickshell imports.

Testing Checklist

  • I have tested these changes locally and on a fresh VM install.
  • I have tested the QML UI on my primary resolution.
  • (If applicable) I have tested UI changes on secondary monitors or different resolutions.
  • (If applicable) I have verified my bash scripts run cleanly without syntax errors.

- Introduced a global `Anim` singleton (`src/theme/Anim.qml`) encapsulating all animation tokens (durations, easings, colors) to replace hardcoded values across the codebase.
- Created `~/.config/Brain_Shell/src/user_data/animation_prefs.json` and tied it to a Quickshell `FileView` inside the `Anim` singleton, allowing users to toggle animation preferences (`slide`, `parallax`, `none`) and adjust duration speeds (`speed_multiplier`) at runtime.
- Extensively refactored popup architectures (`ClockCard`, `AudioControl`, `NetworkPopup`, `Dashboard`) to utilize a single-slide engine state machine.
- Integrated custom `parallax` transition behaviors leveraging synchronized `opacity` fading and slower positional displacement for inactive pages.
- Resolved dynamic resizing overlap bugs in `Dashboard.qml` by unifying the tab transitions to a single, container-level `transitionProgress` mechanism instead of decoupled individual behaviors.
- Eliminated `ReferenceErrors` across QML files by enforcing proper ID bindings in inline signals and fixing unresolved dependency paths.
- Removed legacy `animIdx` multipliers and scattered `<Property>Animation` bindings globally.
@Brainitech
Brainitech merged commit bb68f5c into dev Jun 21, 2026
3 checks passed
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.

1 participant