From 0d8415ba4e24f7e53585c3cb4c741b93532d801a Mon Sep 17 00:00:00 2001 From: omigamedev Date: Tue, 20 Jan 2026 13:28:07 +0100 Subject: [PATCH] remove app animations to fix transition flash Temporarily removed complex animations that were causing double-render flash. Using simple hide/show approach during content loading instead. --- src/main/assets/apps/shell/shell.lua | 31 ++++++-------------------- src/main/assets/apps/shell/shell.rml | 33 ++-------------------------- 2 files changed, 9 insertions(+), 55 deletions(-) diff --git a/src/main/assets/apps/shell/shell.lua b/src/main/assets/apps/shell/shell.lua index 7f95afd..fb334ca 100644 --- a/src/main/assets/apps/shell/shell.lua +++ b/src/main/assets/apps/shell/shell.lua @@ -60,11 +60,8 @@ function loadAppContent_internal(app_id, app_path, skip_animation) -- Load app content using C++ function if loadAppContent then - -- Set opening animation BEFORE loading content to prevent flash - if not skip_animation then - app_container:SetClass("app-opening", true) - app_container:SetClass("app-closing", false) - end + -- Hide container before loading to prevent flash + app_container:SetClass("app-hidden", true) local success = loadAppContent(app_container, app_path) showLoading(false) @@ -74,12 +71,8 @@ function loadAppContent_internal(app_id, app_path, skip_animation) current_app_path = app_path print("[Shell] App loaded: " .. app_id) - -- Remove animation class after it completes - if not skip_animation and setTimeout then - setTimeout(function() - app_container:SetClass("app-opening", false) - end, 300) - end + -- Show container after content is loaded + app_container:SetClass("app-hidden", false) -- If home was loaded, populate apps dynamically if app_id == "home" then @@ -139,20 +132,10 @@ end -- ===== NAVIGATION ===== --- Play closing animation then execute callback +-- Execute callback for navigation (animations removed to fix flash) local function playCloseAnimation(callback) - if app_container and setTimeout then - app_container:SetClass("app-closing", true) - app_container:SetClass("app-opening", false) - setTimeout(function() - -- Don't remove app-closing yet - callback will load new content - -- and loadAppContent_internal will switch to app-opening - if callback then callback() end - end, 200) - else - -- No animation support, execute immediately - if callback then callback() end - end + -- Just execute callback immediately - loadAppContent handles hiding + if callback then callback() end end -- Go back to previous app diff --git a/src/main/assets/apps/shell/shell.rml b/src/main/assets/apps/shell/shell.rml index 31b55e6..daf6ac5 100644 --- a/src/main/assets/apps/shell/shell.rml +++ b/src/main/assets/apps/shell/shell.rml @@ -51,38 +51,9 @@ background-color: #121212; } - /* App launch/close animations */ - .app-opening { - animation: 0.25s back-out app-open; - } - - .app-closing { - animation: 0.2s quadratic-in app-close; - /* Keep at end state after animation */ + /* App visibility - simple hide/show without complex animations */ + .app-hidden { opacity: 0; - transform: scale(0.8); - } - - @keyframes app-open { - from { - opacity: 0; - transform: scale(0.8); - } - to { - opacity: 1; - transform: scale(1.0); - } - } - - @keyframes app-close { - from { - opacity: 1; - transform: scale(1.0); - } - to { - opacity: 0; - transform: scale(0.8); - } } /* System navigation bar at bottom - always visible */