Cleanup
This commit is contained in:
@@ -14,7 +14,6 @@ data ListDisplayParams = ListDisplayParams
|
||||
{ _ldpPos :: ScreenPos
|
||||
, _ldpScale :: Float
|
||||
, _ldpVerticalGap :: Float
|
||||
, _ldpWidth :: SelectionWidth
|
||||
}
|
||||
|
||||
data CursorDisplay
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ::
|
||||
|
||||
Reference in New Issue
Block a user