summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-07-17 20:54:49 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-07-17 20:54:49 +0200
commit4ffea6d426f830925bc930d5bb7ceac781e6c94d (patch)
tree064bafb922fe026724cbce18c3919ea27ec81271
parentfe9d19a394cdb4492d7daf2dfc8f883227fc119e (diff)
downloadphi-4ffea6d426f830925bc930d5bb7ceac781e6c94d.tar
phi-4ffea6d426f830925bc930d5bb7ceac781e6c94d.zip
Some more icon optimizations
-rw-r--r--lib/Phi/Widgets/Taskbar.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Phi/Widgets/Taskbar.hs b/lib/Phi/Widgets/Taskbar.hs
index 72fd5c8..23572bd 100644
--- a/lib/Phi/Widgets/Taskbar.hs
+++ b/lib/Phi/Widgets/Taskbar.hs
@@ -84,7 +84,7 @@ downscaled s surface = do
w <- imageSurfaceGetWidth surface
h <- imageSurfaceGetHeight surface
- renderWithSimilarSurface ContentColorAlpha w h $ \surface' -> do
+ renderWithSimilarSurface ContentColorAlpha (ceiling (fromIntegral w*s)) (ceiling (fromIntegral h*s)) $ \surface' -> do
renderWith surface' $ do
scale 0.5 0.5
downscaled (2*s) surface
@@ -237,11 +237,11 @@ instance WidgetClass Taskbar where
let scalef = (fromIntegral h')/(fromIntegral $ max imageW imageH)
- renderWithSimilarSurface ContentColorAlpha imageW imageH $ \surface -> do
+ renderWithSimilarSurface ContentColorAlpha h' h' $ \surface -> do
renderWith surface $ do
- taskIconStyle style icon
+ downscaled scalef icon
paint
- downscaled scalef surface
+ taskIconStyle style surface
paint
restore