summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreyevanmalicesun <>2019-01-11 03:47:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-01-11 03:47:00 (GMT)
commit8fcec24defc25b3512e60acd0a820776931b3eda (patch)
tree71d3b9e63e01728cada1860c0af450afd27570ad
parentfe6a83fa46e0fc6d26b6b1671655653865451943 (diff)
version 3.1.13.1.1
-rw-r--r--src/System/Taffybar/Widget/Generic/Graph.hs7
-rw-r--r--src/System/Taffybar/Widget/Generic/VerticalBar.hs5
-rw-r--r--src/System/Taffybar/Widget/Util.hs8
-rw-r--r--taffybar.cabal8
4 files changed, 11 insertions, 17 deletions
diff --git a/src/System/Taffybar/Widget/Generic/Graph.hs b/src/System/Taffybar/Widget/Generic/Graph.hs
index e4c692b..9f26cd6 100644
--- a/src/System/Taffybar/Widget/Generic/Graph.hs
+++ b/src/System/Taffybar/Widget/Generic/Graph.hs
@@ -29,9 +29,10 @@ import Data.Foldable ( mapM_ )
import Data.Sequence ( Seq, (<|), viewl, ViewL(..) )
import qualified Data.Sequence as S
import qualified Data.Text as T
+import qualified GI.Cairo.Render as C
+import GI.Cairo.Render.Connector
+import qualified GI.Cairo.Render.Matrix as M
import qualified GI.Gtk as Gtk
-import qualified Graphics.Rendering.Cairo as C
-import qualified Graphics.Rendering.Cairo.Matrix as M
import Prelude hiding ( mapM_ )
import System.Taffybar.Util
import System.Taffybar.Widget.Util
@@ -226,7 +227,7 @@ graphNew cfg = liftIO $ do
}
Gtk.widgetSetSizeRequest drawArea (fromIntegral $ graphWidth cfg) (-1)
- _ <- Gtk.onWidgetDraw drawArea (\ctx -> renderWithContext ctx (drawGraph mv drawArea) >> return True)
+ _ <- Gtk.onWidgetDraw drawArea (\ctx -> renderWithContext (drawGraph mv drawArea) ctx >> return True)
box <- Gtk.hBoxNew False 1
case graphLabel cfg of
diff --git a/src/System/Taffybar/Widget/Generic/VerticalBar.hs b/src/System/Taffybar/Widget/Generic/VerticalBar.hs
index 2bdc73e..4cdf225 100644
--- a/src/System/Taffybar/Widget/Generic/VerticalBar.hs
+++ b/src/System/Taffybar/Widget/Generic/VerticalBar.hs
@@ -15,8 +15,9 @@ module System.Taffybar.Widget.Generic.VerticalBar (
import Control.Concurrent
import Control.Monad
import Control.Monad.IO.Class
+import qualified GI.Cairo.Render as C
+import GI.Cairo.Render.Connector
import GI.Gtk hiding (widgetGetAllocatedSize)
-import qualified Graphics.Rendering.Cairo as C
import System.Taffybar.Util
import System.Taffybar.Widget.Util
@@ -172,7 +173,7 @@ verticalBarNew cfg = liftIO $ do
, barConfig = cfg
}
widgetSetSizeRequest drawArea (fromIntegral $ barWidth cfg) (-1)
- _ <- onWidgetDraw drawArea $ \ctx -> renderWithContext ctx (drawBar mv drawArea) >> return True
+ _ <- onWidgetDraw drawArea $ \ctx -> renderWithContext (drawBar mv drawArea) ctx >> return True
box <- hBoxNew False 1
boxPackStart box drawArea True True 0
widgetShowAll box
diff --git a/src/System/Taffybar/Widget/Util.hs b/src/System/Taffybar/Widget/Util.hs
index 23ff512..bd4c3f4 100644
--- a/src/System/Taffybar/Widget/Util.hs
+++ b/src/System/Taffybar/Widget/Util.hs
@@ -30,13 +30,9 @@ import System.FilePath.Posix
import System.Taffybar.Information.XDG.DesktopEntry
import System.Taffybar.Util
import Text.Printf
-import qualified Graphics.Rendering.Cairo as C
import qualified GI.Cairo
import Control.Monad.Trans.Reader (runReaderT)
-import Graphics.Rendering.Cairo.Internal (Render(runRender))
import Foreign.Ptr (castPtr)
-import Graphics.Rendering.Cairo.Types (Cairo(Cairo))
-
import Paths_taffybar ( getDataDir )
@@ -167,7 +163,3 @@ setMinWidth :: (Gtk.IsWidget w, MonadIO m) => Int -> w -> m w
setMinWidth width widget = liftIO $ do
Gtk.widgetSetSizeRequest widget (fromIntegral width) (-1)
return widget
-
-renderWithContext :: GI.Cairo.Context -> C.Render () -> IO ()
-renderWithContext ct r = GI.Cairo.withManagedPtr ct $ \p ->
- runReaderT (runRender r) (Cairo (castPtr p))
diff --git a/taffybar.cabal b/taffybar.cabal
index d77b86c..9e2ffd9 100644
--- a/taffybar.cabal
+++ b/taffybar.cabal
@@ -1,5 +1,5 @@
name: taffybar
-version: 3.1.0
+version: 3.1.1
synopsis: A desktop bar similar to xmobar, but with more GUI
license: BSD3
license-file: LICENSE
@@ -44,7 +44,6 @@ library
, HTTP
, X11 >= 1.5.0.1
, bytestring
- , cairo
, containers
, dbus >= 1.2.1 && < 2.0.0
, dbus-hslogger >= 0.1.0.1 && < 0.2.0.0
@@ -54,6 +53,8 @@ library
, enclosed-exceptions >= 1.0.0.1
, filepath
, gi-cairo
+ , gi-cairo-render
+ , gi-cairo-connector
, gi-gdk
, gi-gdkpixbuf >= 2.0.16
, gi-gdkx11
@@ -61,7 +62,6 @@ library
, gi-gtk
, gi-gtk-hs
, gi-pango
- , glib
, gtk-sni-tray >= 0.1.5.0
, gtk-strut >= 0.1.2.1
, haskell-gi >= 0.21.2
@@ -74,7 +74,7 @@ library
, rate-limit >= 1.1.1
, regex-compat
, safe >= 0.3 && < 1
- , scotty >= 11.2 && < 12.0
+ , scotty >= 0.11.2 && < 0.12.0
, split >= 0.1.4.2
, status-notifier-item >= 0.3.0.1
, stm