add horizontal scrolling functionality to SearchBar

This commit is contained in:
2025-09-14 10:07:43 +01:00
parent f1a06f946d
commit 0632f7a969
3 changed files with 17 additions and 5 deletions

View File

@@ -58,6 +58,7 @@ struct
, floatWindowWidth
, floatWindowHeight
, searchCursorIdx
, searchScrollColumn
) =
let
val r: Real32.real = 0.67
@@ -95,7 +96,8 @@ struct
val cursor =
let
val xpos = TextConstants.xSpace * (searchCursorIdx + 1) + startX
val xpos = (searchCursorIdx + 1) - searchScrollColumn
val xpos = TextConstants.xSpace * xpos + startX
val xpos = Int.min (endX, xpos)
val x = Real32.fromInt xpos
in
@@ -115,7 +117,7 @@ struct
val posX = startX + TC.xSpace
in
loop
( 0
( searchScrollColumn
, str
, posX
, startY