summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-07-18 19:21:54 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-07-18 19:21:54 +0200
commit4cc0f0f2ee44aa5c65b8b7f759620b5de0c874a3 (patch)
tree468bcb675a317ddc1b9d98c82d02cd2d071a9bae /lib
parent9d1415a2d35a10be828fac5c9534ba477233aa49 (diff)
downloadphi-4cc0f0f2ee44aa5c65b8b7f759620b5de0c874a3.tar
phi-4cc0f0f2ee44aa5c65b8b7f759620b5de0c874a3.zip
Fixed indentation
Diffstat (limited to 'lib')
-rw-r--r--lib/Phi/Widgets/Taskbar.hs32
1 files changed, 17 insertions, 15 deletions
diff --git a/lib/Phi/Widgets/Taskbar.hs b/lib/Phi/Widgets/Taskbar.hs
index b71efca..e1d0ed9 100644
--- a/lib/Phi/Widgets/Taskbar.hs
+++ b/lib/Phi/Widgets/Taskbar.hs
@@ -54,6 +54,7 @@ instance Show IconStyle where
idIconStyle :: IconStyle
idIconStyle = flip withPatternForSurface setSource
+
desaturateIconStyle :: Double -> IconStyle
desaturateIconStyle v icon = do
w <- imageSurfaceGetWidth icon
@@ -78,24 +79,25 @@ desaturateIconStyle v icon = do
withPatternForSurface surface setSource
+
downscaled :: Double -> Surface -> Render ()
downscaled s surface = do
- case True of
- _ | s < 0.5 -> do
- w <- imageSurfaceGetWidth surface
- h <- imageSurfaceGetHeight surface
-
- renderWithSimilarSurface ContentColorAlpha (ceiling (fromIntegral w*s)) (ceiling (fromIntegral h*s)) $ \surface' -> do
- renderWith surface' $ do
- scale 0.5 0.5
- downscaled (2*s) surface
- paint
- withPatternForSurface surface' setSource
-
- | otherwise -> do
- scale s s
- withPatternForSurface surface setSource
+ case True of
+ _ | s < 0.5 -> do
+ w <- imageSurfaceGetWidth surface
+ h <- imageSurfaceGetHeight surface
+
+ renderWithSimilarSurface ContentColorAlpha (ceiling (fromIntegral w*s)) (ceiling (fromIntegral h*s)) $ \surface' -> do
+ renderWith surface' $ do
+ scale 0.5 0.5
+ downscaled (2*s) surface
+ paint
+ withPatternForSurface surface' setSource
+ | otherwise -> do
+ scale s s
+ withPatternForSurface surface setSource
+
data TaskStyle = TaskStyle { taskFont :: !String
, taskColor :: !Color