summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Phi/Widgets/Taskbar.hs32
-rw-r--r--src/Phi.hs2
2 files changed, 18 insertions, 16 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
diff --git a/src/Phi.hs b/src/Phi.hs
index b546e10..a842e4d 100644
--- a/src/Phi.hs
+++ b/src/Phi.hs
@@ -21,7 +21,7 @@ main = do
}
normalDesktopBorder = normalTaskBorder { margin = BorderWidth 2 3 2 3
, padding = BorderWidth 0 2 0 2
- , borderColor = (0.7, 0.7, 0.7, 0.8)
+ , borderColor = (0.7, 0.7, 0.7, 0.9)
, backgroundColor = (1, 1, 1, 0.9)
}
currentDesktopBorder = normalDesktopBorder { backgroundColor = (0.2, 0.2, 0.2, 0.9)