From fbf67ef050c8a82ffe6156b255cc89d6020c1084 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 24 Feb 2026 12:27:00 +0000 Subject: algo/scrolling: adjust focus callbacks to be more intuitive --- src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.hpp') diff --git a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.hpp b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.hpp index 109aa99e..20db6efe 100644 --- a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.hpp +++ b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.hpp @@ -77,7 +77,7 @@ namespace Layout::Tiled { SP prev(SP c); SP atCenter(); - bool visible(SP c); + bool visible(SP c, bool full = false); void centerCol(SP c); void fitCol(SP c); void centerOrFitCol(SP c); @@ -111,6 +111,12 @@ namespace Layout::Tiled { CBox usableArea(); + enum eInputMode : uint8_t { + INPUT_MODE_SOFT = 0, + INPUT_MODE_CLICK, + INPUT_MODE_KB + }; + private: SP m_scrollingData; @@ -130,7 +136,7 @@ namespace Layout::Tiled { void focusTargetUpdate(SP target); void moveTargetTo(SP t, Math::eDirection dir, bool silent); - void focusOnInput(SP target, bool hardInput); + void focusOnInput(SP target, eInputMode input); friend struct SScrollingData; }; -- cgit v1.2.3