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/ScrollTapeController.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/layout/algorithm/tiled/scrolling/ScrollTapeController.cpp') diff --git a/src/layout/algorithm/tiled/scrolling/ScrollTapeController.cpp b/src/layout/algorithm/tiled/scrolling/ScrollTapeController.cpp index 63b98717..c6cda4b5 100644 --- a/src/layout/algorithm/tiled/scrolling/ScrollTapeController.cpp +++ b/src/layout/algorithm/tiled/scrolling/ScrollTapeController.cpp @@ -241,7 +241,7 @@ void CScrollTapeController::fitStrip(size_t stripIndex, const CBox& usableArea, m_offset = std::clamp(m_offset, stripStart - usablePrimary + stripSize, stripStart); } -bool CScrollTapeController::isStripVisible(size_t stripIndex, const CBox& usableArea, bool fullscreenOnOne) const { +bool CScrollTapeController::isStripVisible(size_t stripIndex, const CBox& usableArea, bool fullscreenOnOne, bool full) const { if (stripIndex >= m_strips.size()) return false; @@ -250,7 +250,10 @@ bool CScrollTapeController::isStripVisible(size_t stripIndex, const CBox& usable const double viewStart = m_offset; const double viewEnd = m_offset + getPrimary(usableArea.size()); - return stripStart < viewEnd && viewStart < stripEnd; + if (!full) + return stripStart < viewEnd && viewStart < stripEnd; + else + return stripStart >= viewStart && stripEnd <= viewEnd; } size_t CScrollTapeController::getStripAtCenter(const CBox& usableArea, bool fullscreenOnOne) const { -- cgit v1.2.3