diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-02-24 12:27:00 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2026-02-24 12:27:00 +0000 |
| commit | fbf67ef050c8a82ffe6156b255cc89d6020c1084 (patch) | |
| tree | 921362eaddd964015fabe55dced231e3f8c15c9a /src/layout/algorithm/tiled/scrolling/ScrollTapeController.cpp | |
| parent | be893a81b4533d1dc22e91f7d603dbb536ed79f8 (diff) | |
algo/scrolling: adjust focus callbacks to be more intuitive
Diffstat (limited to 'src/layout/algorithm/tiled/scrolling/ScrollTapeController.cpp')
| -rw-r--r-- | src/layout/algorithm/tiled/scrolling/ScrollTapeController.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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 { |
