[Fencommits] fenfire-hs: don't combine text color with markColor, rather default it to black
Tuukka Hastrup
Tuukka.Hastrup at iki.fi
Thu Feb 15 12:43:04 EET 2007
Thu Feb 15 12:42:48 EET 2007 Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
* don't combine text color with markColor, rather default it to black
diff -rN -u old-fenfire-hs/Fenfire.fhs new-fenfire-hs/Fenfire.fhs
--- old-fenfire-hs/Fenfire.fhs 2007-02-15 12:43:04.000000000 +0200
+++ new-fenfire-hs/Fenfire.fhs 2007-02-15 12:43:04.000000000 +0200
@@ -168,12 +168,12 @@
placeNode cols (Rotation graph node _) = do
scale' <- getScale
let f vob = case bg of Nothing -> vob
- _ -> setFgColor (fromJust fg) $
- setBgColor (fromJust bg) vob
+ Just c -> setFgColor fg $
+ setBgColor c vob
markColor = if node `Set.member` mark then Just (Color 1 0 0 1)
else Nothing
bg = combine (fmap (\(_,b,_) -> b) cols) markColor
- fg = combine (fmap (\(_,_,c) -> c) cols) markColor
+ fg = maybe (Color 0 0 0 1) (\(_,_,c) -> c) cols
combine Nothing c = c
combine c Nothing = c
combine (Just c1) (Just c2) = Just $ interpolate 0.5 c1 c2
More information about the Fencommits
mailing list