Add optional smooth scrolling across UI scrollable widgets

Introduce UIScrollController to provide frame-rate-independent wheel
interpolation, touch dragging, and momentum for code editors, terminals,
scroll views, and scrollable widgets while preserving the legacy instant
scrolling path.

Add a UISceneNode-level smooth-scrolling policy. Embedded scenes inherit
the root scene setting, new widgets snapshot it during construction, and
setSmoothScrollEnabled() can optionally apply changes to existing widgets
across the complete embedded-scene hierarchy.

Move native macOS scrolling and title-bar helpers into PlatformHelper,
enable native momentum from UIApplication, and explicitly enable it in
ecode. Preserve precise SDL2 and SDL3 wheel deltas for fractional momentum
events without changing normal integer wheel steps.

Replace the separate editor and terminal preferences in ecode and eterm
with one global smooth-scrolling setting, including legacy configuration
migration, live updates, and localized settings text.

Improve UITouchDraggableWidget momentum handling and add regression tests
for scrolling interpolation, pixel-aligned editor positions, scene
inheritance, widget overrides, and immediate policy application.
This commit is contained in:
Martín Lucas Golini
2026-09-13 20:27:37 -03:00
parent 42de99cf3b
commit 071bc5d697
46 changed files with 1250 additions and 305 deletions

View File

@@ -1643,7 +1643,8 @@ solution "eepp"
language "C++"
set_targetdir("libs/" .. os.get_real() .. "/")
includedirs { "include", "src" }
files { "src/eepp/ui/platform/macos/macosmenubar.mm" }
files { "src/eepp/ui/platform/macos/macosmenubar.mm",
"src/eepp/window/platform/macos/platformhelper.mm" }
buildoptions { "-x objective-c++" }
if not is_vs() then
buildoptions{ "-std=c++20" }
@@ -1869,30 +1870,6 @@ solution "eepp"
files { "src/tools/uieditor/*.cpp" }
build_link_configuration( "eepp-UIEditor", true )
if os.is("macosx") then
project "ecode-macos-helper-static"
kind "StaticLib"
language "C++"
files { "src/tools/ecode/macos/*.m" }
set_targetdir("libs/" .. os.get_real() .. "/thirdparty/")
configuration "debug"
defines { "DEBUG", "EE_DEBUG", "EE_MEMORY_MANAGER" }
flags { "Symbols" }
buildoptions{ "-Wall" }
buildoptions{ "-g3" }
targetname ( "ecode-macos-helper-static-debug" )
configuration "release"
defines { "NDEBUG" }
flags { "OptimizeSpeed" }
if _OPTIONS["with-debug-symbols"] then
flags { "Symbols" }
end
buildoptions{ "-O3" }
targetname ( "ecode-macos-helper-static" )
end
project "ecode"
set_kind()
language "C++"
@@ -1908,7 +1885,6 @@ solution "eepp"
end
if os.is("macosx") then
links { "CoreFoundation.framework", "CoreServices.framework", "Cocoa.framework" }
links { "ecode-macos-helper-static" }
end
if os.is_real("linux") then
links { "util" }