diff --git a/src/Dodge/Data/SelectionList.hs b/src/Dodge/Data/SelectionList.hs index 05ea32e04..3cb8b676c 100644 --- a/src/Dodge/Data/SelectionList.hs +++ b/src/Dodge/Data/SelectionList.hs @@ -14,7 +14,6 @@ data ListDisplayParams = ListDisplayParams { _ldpPos :: ScreenPos , _ldpScale :: Float , _ldpVerticalGap :: Float - , _ldpWidth :: SelectionWidth } data CursorDisplay diff --git a/src/Dodge/ListDisplayParams.hs b/src/Dodge/ListDisplayParams.hs index 87f3af18a..db4e64cc7 100644 --- a/src/Dodge/ListDisplayParams.hs +++ b/src/Dodge/ListDisplayParams.hs @@ -3,7 +3,6 @@ module Dodge.ListDisplayParams ( invCursorParams, secondColumnParams, subInvX, - defaultListDisplayParams, optionListDisplayParams, ) where @@ -26,7 +25,6 @@ defaultListDisplayParams = { _spScreenOff = V2 (-0.5) 0.5 -- top left , _spPixelOff = 0 } - , _ldpWidth = UseItemWidth } invDP :: ListDisplayParams @@ -59,4 +57,3 @@ optionListDisplayParams = & ldpPos . spPixelOff .~ V2 11 (-70) & ldpScale .~ 2 & ldpVerticalGap .~ 0 - & ldpWidth .~ FixedSelectionWidth 50 diff --git a/src/Dodge/Render/List.hs b/src/Dodge/Render/List.hs index e201c5f6e..6381277b5 100644 --- a/src/Dodge/Render/List.hs +++ b/src/Dodge/Render/List.hs @@ -90,12 +90,6 @@ drawCursorAt mi lis ldps width curs = fromMaybe mempty $ do width (_siHeight selit) -getLDPWidth :: ListDisplayParams -> Int -> Int -> IM.IntMap (SelectionSection a) -> Int -getLDPWidth ldps i j sss = case _ldpWidth ldps of - FixedSelectionWidth x -> x --- UseMaxSelectionItemWidth -> a - UseItemWidth -> fromMaybe 0 $ sss ^? ix i . ssItems . ix j . siWidth - drawListYoff :: Int -> [Picture] -> Picture drawListYoff = drawListYgapScaleYoff 0 1 @@ -119,7 +113,6 @@ selSecDrawCursorAt ldp curs sss (i, j) = fold $ do yint <- selSecYint i j sss sindent <- sss ^? ix i . ssIndent si <- sss ^? ix i . ssItems . ix j - let xsize = getLDPWidth ldp i j sss return $ listCursorChooseBorderScale (ldp ^. ldpVerticalGap) @@ -128,7 +121,7 @@ selSecDrawCursorAt ldp curs sss (i, j) = fold $ do yint (_siOffX si + sindent) (_siColor si) - xsize + (_siWidth si) (_siHeight si) selSecDrawCursor ::