diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-07-16 03:08:55 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-07-16 03:08:55 +0200 |
commit | a4936c35b6f788df63da7adb1aaa15c50d648654 (patch) | |
tree | bd399fe61f33d29e2a9be50373aab479a95da5c8 /lib/Phi | |
parent | 3f4007681aa97ddbf8101c22f949dc2572bcfa7c (diff) | |
download | phi-a4936c35b6f788df63da7adb1aaa15c50d648654.tar phi-a4936c35b6f788df63da7adb1aaa15c50d648654.zip |
Always use biggest icon
Diffstat (limited to 'lib/Phi')
-rw-r--r-- | lib/Phi/Widgets/Taskbar.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Phi/Widgets/Taskbar.hs b/lib/Phi/Widgets/Taskbar.hs index 3f3b3c2..4f85e71 100644 --- a/lib/Phi/Widgets/Taskbar.hs +++ b/lib/Phi/Widgets/Taskbar.hs @@ -212,13 +212,9 @@ renderText style x y w h text = do showLayout layout bestIcon :: Int -> [(Int, Surface)] -> Maybe Surface -bestIcon h icons = findBest $ sortBy compareIcons icons +bestIcon h icons = fmap snd . listToMaybe $ sortBy compareIcons icons where compareIcons = flip (compare `on` fst) - - findBest (a1:a2:ax) = if (fst a2) < h then Just $ snd a1 else findBest (a2:ax) - findBest [a] = Just $ snd a - findBest [] = Nothing windowOnDesktop :: Int -> WindowState -> Bool |