Work on selection lists and option menus
This commit is contained in:
@@ -24,3 +24,13 @@ setShownSelectionItems' maxlines offset sl = case sl ^? scListDisplayParams . ld
|
||||
where
|
||||
-- dummyitem = (SelectionItem [] 1 False 0 white 0, DummySelectionItem)
|
||||
allitems = zipWith (\x y -> (x,ListedSelectionItem y)) (sl ^. scSelectionList . slItems) [0..]
|
||||
|
||||
getAvailableListLines :: ListDisplayParams -> Configuration -> Int
|
||||
getAvailableListLines ldps cfig = nlines
|
||||
where
|
||||
nlines = floor ((dToBot - vgap) / itmHeight)
|
||||
vgap = ldps ^. ldpVerticalGap
|
||||
itmHeight = 10 * ldps ^. ldpScale + vgap
|
||||
dToBot = cfig ^. windowY - (ldps ^. ldpPosY + dFromScreenBot)
|
||||
dFromScreenBot = 5 -- fromMaybe 0 $ sl ^? slSizeRestriction . ssrType . ssrFromScreenBottom
|
||||
|
||||
|
||||
Reference in New Issue
Block a user