From b9419e6a65777d5bbe858dabee8175989a6d79fb Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 16 Oct 2026 13:03:28 +0000 Subject: [PATCH] player: scroll the info text in thirds of a screen (#23) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One D-pad press moved 85% of the panel, so consecutive stops barely overlapped and the middle of a long description was never on screen — on tube.jeena.net/w/p4HtZrDCMbPfGYpMfG9fMN Jeena could not read the passage about the credit-card outlier at all (#23 review). A press now moves about a third of a screenful, so each stop repeats two thirds of the previous one and every line gets shown on the way down. --- .../main/java/net/jeena/jtubetv/ui/player/PlayerSidebar.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/jeena/jtubetv/ui/player/PlayerSidebar.kt b/app/src/main/java/net/jeena/jtubetv/ui/player/PlayerSidebar.kt index 9cdc38d..7666884 100644 --- a/app/src/main/java/net/jeena/jtubetv/ui/player/PlayerSidebar.kt +++ b/app/src/main/java/net/jeena/jtubetv/ui/player/PlayerSidebar.kt @@ -245,7 +245,11 @@ private fun DescriptionScroll( .background(if (focused) Color(0x0DFFFFFF) else Color.Transparent) .onPreviewKeyEvent { ke -> if (ke.type != KeyEventType.KeyDown) return@onPreviewKeyEvent false - val step = (viewportPx * 0.85f).coerceAtLeast(240f) + // One press moves a third of a screenful, so consecutive stops + // overlap and every line of a long description gets shown (issue + // #23 review: the old 85% step jumped past the middle of the text + // on tube.jeena.net/w/p4HtZrDCMbPfGYpMfG9fMN). + val step = (viewportPx * 0.34f).coerceAtLeast(150f) val code = ke.nativeKeyEvent.keyCode // Match Compose's normalised key AND the raw keycode: remotes don't all // report the same native codes, and matching only the raw one left UP