cairo 0.13.4.2 → 0.13.5.0
raw patch · 3 files changed
+8/−10 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Graphics.Rendering.Cairo: liftIO :: MonadIO m => forall a. IO a -> m a
+ Graphics.Rendering.Cairo: liftIO :: MonadIO m => forall a. () => IO a -> m a
Files
Graphics/Rendering/Cairo/Internal/Utilities.chs view
@@ -16,7 +16,7 @@ {#import Graphics.Rendering.Cairo.Types#} -import Foreign+import Foreign hiding (unsafePerformIO) import Foreign.C -- TODO work around cpphs https://ghc.haskell.org/trac/ghc/ticket/13553 #if __GLASGOW_HASKELL__ >= 707 || __GLASGOW_HASKELL__ == 0
cairo.cabal view
@@ -1,5 +1,5 @@ Name: cairo-Version: 0.13.4.2+Version: 0.13.5.0 License: BSD3 License-file: COPYRIGHT Copyright: (c) 2001-2010 The Gtk2Hs Team, (c) Paolo Martini 2005, (c) Abraham Egnor 2003, 2004, (c) Aetion Technologies LLC 2004@@ -53,7 +53,7 @@ custom-setup setup-depends: base >= 4.6,- Cabal >= 1.24 && < 2.1,+ Cabal >= 1.24 && < 2.3, gtk2hs-buildtools >= 0.13.2.0 && < 0.14 Library
demo/gtk3/Clock.hs view
@@ -17,7 +17,7 @@ import Graphics.Rendering.Cairo import Graphics.UI.Gtk import Graphics.UI.Gtk.Gdk.EventM-import System.Time+import Data.Time import Control.Monad (when) import Data.Maybe (isJust) import Data.IORef@@ -62,12 +62,10 @@ setLineCap LineCapRound setLineJoin LineJoinRound - time <- liftIO (getClockTime >>= toCalendarTime)- let hours = fromIntegral (if ctHour time >= 12- then ctHour time - 12- else ctHour time)- minutes = fromIntegral (ctMin time)- seconds = fromIntegral (ctSec time)+ time <- liftIO (localTimeOfDay . zonedTimeToLocalTime <$> getZonedTime)+ let hours = fromIntegral (todHour time `mod` 12)+ minutes = fromIntegral (todMin time)+ seconds = realToFrac (todSec time) drawHourHand quality hours minutes seconds drawMinuteHand quality minutes seconds