Cleanup, hide item selection cursor when in terminal
This commit is contained in:
@@ -144,7 +144,7 @@ selSecSelSize :: Int -> Int -> IMSS a -> Maybe Int
|
||||
selSecSelSize i j = (^? ix i . ssItems . ix j . siHeight)
|
||||
|
||||
-- need to check that the vertical gap is correctly put in here
|
||||
posSelSecYint :: Config -> ListDisplayParams -> Float -> Int
|
||||
posSelSecYint :: Config -> LDParams -> Float -> Int
|
||||
posSelSecYint cfig ldp y = floor $ (y0 - y) / (20 / ldp ^. ldpScale + ldp ^. ldpVerticalGap)
|
||||
where
|
||||
V2 _ y0 = screenPosAbs cfig (ldp ^. ldpPos)
|
||||
@@ -175,12 +175,7 @@ inverseSelSecYint yint sss
|
||||
return $ NonInf (i, j)
|
||||
|
||||
inverseSelSecYintXPosCheck ::
|
||||
Config ->
|
||||
ListDisplayParams ->
|
||||
Float ->
|
||||
Int ->
|
||||
IMSS a ->
|
||||
Maybe (Int,Int)
|
||||
Config -> LDParams -> Float -> Int -> IMSS a -> Maybe (Int,Int)
|
||||
inverseSelSecYintXPosCheck cfig ldp x yint sss = do
|
||||
(i,j) <- inverseSelSecYint yint sss ^? nonInf
|
||||
let V2 x0 _ = screenPosAbs cfig (ldp ^. ldpPos)
|
||||
@@ -190,6 +185,6 @@ inverseSelSecYintXPosCheck cfig ldp x yint sss = do
|
||||
guard $ x - x1 < 160 && x > x1
|
||||
return (i,j)
|
||||
|
||||
inverseSelNumPos :: Config -> ListDisplayParams -> Point2 -> IMSS a -> Maybe (Int, Int)
|
||||
inverseSelNumPos :: Config -> LDParams -> Point2 -> IMSS a -> Maybe (Int, Int)
|
||||
inverseSelNumPos cfig ldp (V2 x y) =
|
||||
inverseSelSecYintXPosCheck cfig ldp x (posSelSecYint cfig ldp y)
|
||||
|
||||
Reference in New Issue
Block a user