Add hacky block shadow to inventory items

This commit is contained in:
2025-12-26 10:41:21 +00:00
parent b9a6bd5f67
commit 2cb9fb153a
5 changed files with 188 additions and 181 deletions
+6 -11
View File
@@ -259,13 +259,7 @@ updateSectionsPositioning h mselpos allavailablelines lsss sss =
lk = mselpos ^.. _Just . slSec
ssizes = sectionsSizes allavailablelines lk $ sectionsDesiredLines ls
updateSection ::
Int ->
Maybe Int ->
IM.IntMap (SelectionItem a) ->
Int ->
Int ->
SelSection a
updateSection :: Int -> Maybe Int -> IMSI a -> Int -> Int -> SelSection a
updateSection indent mcsel sis availablelines oldoffset =
SelSection
{ _ssItems = sis
@@ -305,10 +299,11 @@ updateSection indent mcsel sis availablelines oldoffset =
listSelectionColorPicture :: SelectionItem a -> ([Picture], Sum Int)
listSelectionColorPicture si = (g <$> _siPictures si, Sum $ _siHeight si)
where
textf = case si ^. siDisplayMod of
NoSIDisplayMod -> text
HighlightSI -> hackBoldText
g = translate lindent 0 . color (_siColor si) . textf
g = translate lindent 0 . case si ^. siDisplayMod of
NoSIDisplayMod -> docolor . text
HighlightSI -> docolor . hackBoldText
DropShadowSI -> hackDropShadow (si ^. siColor) black
docolor = color (si ^. siColor)
lindent = 100 * fromIntegral (_siOffX si)
regexList :: String -> [String] -> Bool