Remove _ssCursor

This commit is contained in:
2024-10-31 09:55:12 +00:00
parent 79b0af228e
commit a2dd10323c
5 changed files with 93 additions and 88 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ data SectionCursor = SectionCursor
data SelectionSection a = SelectionSection
{ _ssItems :: IntMap (SelectionItem a)
, _ssCursor :: Maybe SectionCursor
-- , _ssCursor :: Maybe SectionCursor
, _ssMinSize :: Int
, _ssOffset :: Int
, _ssShownItems :: [Picture]
+1 -1
View File
@@ -187,7 +187,7 @@ defaultSS :: SelectionSection a
defaultSS =
SelectionSection
{ _ssItems = mempty
, _ssCursor = Nothing
-- , _ssCursor = Nothing
, _ssMinSize = 10
, _ssOffset = 0
, _ssShownItems = []
+5 -5
View File
@@ -206,7 +206,7 @@ updateSection ::
updateSection sis mcsel availablelines ss =
ss
& ssItems .~ sis
& ssCursor .~ scurs
-- & ssCursor .~ scurs
& ssOffset .~ offset
& ssShownItems .~ shownitems
where
@@ -290,7 +290,7 @@ enterCombineInv cfig w =
filtsection =
SelectionSection
{ _ssItems = mempty
, _ssCursor = Nothing
-- , _ssCursor = Nothing
, _ssMinSize = 0
, _ssOffset = 0
, _ssShownItems = mempty
@@ -304,9 +304,9 @@ enterCombineInv cfig w =
availablelines
SelectionSection
{ _ssItems = cm
, _ssCursor = do
(_, si) <- IM.lookupMin cm
return $ SectionCursor 0 (_siHeight si) (_siColor si)
-- , _ssCursor = do
-- (_, si) <- IM.lookupMin cm
-- return $ SectionCursor 0 (_siHeight si) (_siColor si)
, _ssMinSize = 5
, _ssOffset = 0
, _ssShownItems = mempty