summaryrefslogtreecommitdiffstats
path: root/lib/Phi/Widgets/Taskbar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Phi/Widgets/Taskbar.hs')
-rw-r--r--lib/Phi/Widgets/Taskbar.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Phi/Widgets/Taskbar.hs b/lib/Phi/Widgets/Taskbar.hs
index 23572bd..ab67846 100644
--- a/lib/Phi/Widgets/Taskbar.hs
+++ b/lib/Phi/Widgets/Taskbar.hs
@@ -237,6 +237,10 @@ instance WidgetClass Taskbar where
let scalef = (fromIntegral h')/(fromIntegral $ max imageW imageH)
+ case True of
+ _ | imageH < imageW -> translate 0 (fromIntegral (imageW-imageH)*scalef/2)
+ | otherwise -> translate (fromIntegral (imageH-imageW)*scalef/2) 0
+
renderWithSimilarSurface ContentColorAlpha h' h' $ \surface -> do
renderWith surface $ do
downscaled scalef icon