Mostly use String instead of Text

This commit is contained in:
2023-01-15 12:26:45 +00:00
parent 64b1c2761e
commit a50e2ff406
18 changed files with 50 additions and 65 deletions
+10 -2
View File
@@ -2,6 +2,7 @@ module Dodge.SelectionList where
--import Color
--import Dodge.WindowLayout
import Color
import Regex
import Dodge.Data.Universe
import LensHelp
@@ -26,7 +27,14 @@ defaultSelectionList = SelectionList
getShownItems :: SelectionList a -> [SelectionItem a]
getShownItems sl = case sl ^. slRegex of
"" -> _slItems sl
str -> SelectionFilter ["FILTER: "++str] : filter (doregex str) (_slItems sl)
"" | not (sl ^. slRegexInput) -> _slItems sl
str -> SelectionFilter
{ _siPictures = ["FILTER: "++str]
, _siHeight = 1
, _siIsSelectable = False
, _siWidth = length $ "FILTER: "++str
, _siColor = white
, _siOffX = 0
}: filter (doregex str) (_slItems sl)
where
doregex str = regexList str . _siPictures