From 02b6f62a0e4a1f341e5d70b534b576e1e6f67813 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 14 Feb 2019 10:55:50 +0100 Subject: [PATCH] Style changes to the progress example. --- src/Reanimate/Examples.hs | 11 ++++++----- src/SvgViewer.hs | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Reanimate/Examples.hs b/src/Reanimate/Examples.hs index 50ec728..5e7ff02 100644 --- a/src/Reanimate/Examples.hs +++ b/src/Reanimate/Examples.hs @@ -108,6 +108,7 @@ morph_wave_circle = proc t -> do progressMeters :: Ani () progressMeters = proc () -> do + emit -< rect_ [width_ "100%", height_ "100%", fill_ "black"] annotate' progressMeter -< g_ [transform_ $ translate 40 20] annotate' (adjustSpeed 2 progressMeter) -< g_ [transform_ $ translate 140 20] annotate' (adjustSpeed 0.5 progressMeter) -< g_ [transform_ $ translate 240 20] @@ -115,20 +116,20 @@ progressMeters = proc () -> do emit -< do text_ [x_ "55", y_ "150", font_size_ "20" , text_anchor_ "middle" - , fill_ "black"] "1x" + , fill_ "white"] "1x" text_ [x_ "155", y_ "150", font_size_ "20" , text_anchor_ "middle" - , fill_ "black"] "2x" + , fill_ "white"] "2x" text_ [x_ "255", y_ "150", font_size_ "20" , text_anchor_ "middle" - , fill_ "black"] "0.5x" + , fill_ "white"] "0.5x" progressMeter :: Ani () progressMeter = defineAnimation $ proc () -> do duration 5 -< () h <- signal 0 100 -< () - emit -< rect_ [ width_ "30", height_ "100", stroke_ "black", fill_opacity_ "0" ] - emit -< rect_ [ width_ "30", height_ (pack $ show h), stroke_ "black", fill_ "grey" ] + emit -< rect_ [ width_ "30", height_ "100", stroke_ "white", stroke_width_ "2", fill_opacity_ "0" ] + emit -< rect_ [ width_ "30", height_ (pack $ show h), stroke_ "white", fill_ "white" ] returnA -< () highlight :: Ani () diff --git a/src/SvgViewer.hs b/src/SvgViewer.hs index 262e429..35ba639 100644 --- a/src/SvgViewer.hs +++ b/src/SvgViewer.hs @@ -15,7 +15,7 @@ import Data.Time import Reanimate.Arrow import Reanimate.Examples -animation = morph_wave_circle +animation = progressMeters main :: IO () main = do