Fix indentation display of indented sections

This commit is contained in:
2024-11-24 14:07:54 +00:00
parent 5bea148556
commit e6c2b659fd
6 changed files with 42 additions and 36 deletions
+3 -1
View File
@@ -457,7 +457,9 @@ selNumPosCardinal ::
selNumPosCardinal card cfig ldp sss i j = do
ipos <- selSecYint i j sss
size <- selSecSelSize i j sss
indent <- sss ^? ix i . ssItems . ix j . siOffX
itmindent <- sss ^? ix i . ssItems . ix j . siOffX
sindent <- sss ^? ix i . ssIndent
let indent = itmindent + sindent
let offset = cardEightVec card * V2 0 (fromIntegral size * 0.5 * 20 * s)
return $
screenPosAbs cfig (ldp ^. ldpPos)
+3 -1
View File
@@ -67,6 +67,7 @@ makeSelectionListPictures = concatMap f
where
f si = map (color (_siColor si) . text) $ _siPictures si
-- note this does not take into account any selectionsection indent
drawCursorAt ::
Maybe Int ->
[SelectionItem a] ->
@@ -113,6 +114,7 @@ selSecDrawCursorAt ::
Picture
selSecDrawCursorAt xsize ldp curs sss (i, j) = fold $ do
yint <- selSecYint i j sss
sindent <- sss ^? ix i . ssIndent
si <- sss ^? ix i . ssItems . ix j
return $
listCursorChooseBorderScale
@@ -120,7 +122,7 @@ selSecDrawCursorAt xsize ldp curs sss (i, j) = fold $ do
(ldp ^. ldpScale)
curs
yint
(_siOffX si)
(_siOffX si + sindent)
(_siColor si)
xsize
(_siHeight si)