mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Merge pull request #858 from dcousens/fix-min-width
Fix minimum widths for Shrink and Expand
This commit is contained in:
commit
5ceaed8126
@ -56,8 +56,8 @@ instance LayoutClass TwoPane a where
|
||||
|
||||
handleMessage (TwoPane delta split) x =
|
||||
return $ case fromMessage x of
|
||||
Just Shrink -> Just (TwoPane delta (split - delta))
|
||||
Just Expand -> Just (TwoPane delta (split + delta))
|
||||
Just Shrink -> Just (TwoPane delta (max 0 (split - delta)))
|
||||
Just Expand -> Just (TwoPane delta (min 1 (split + delta)))
|
||||
_ -> Nothing
|
||||
|
||||
description _ = "TwoPane"
|
||||
|
@ -58,8 +58,8 @@ instance (Show a, Eq a) => LayoutClass TwoPanePersistent a where
|
||||
|
||||
pureMessage (TwoPanePersistent w delta split) x =
|
||||
case fromMessage x of
|
||||
Just Shrink -> Just (TwoPanePersistent w delta (split - delta))
|
||||
Just Expand -> Just (TwoPanePersistent w delta (split + delta))
|
||||
Just Shrink -> Just (TwoPanePersistent w delta (max 0 (split - delta)))
|
||||
Just Expand -> Just (TwoPanePersistent w delta (min 1 (split + delta)))
|
||||
_ -> Nothing
|
||||
|
||||
description _ = "TwoPanePersistent"
|
||||
|
Loading…
x
Reference in New Issue
Block a user