mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
XMonad.Layout.Spacing: Remove deprecations
This commit is contained in:
parent
16701c2df2
commit
d8a23d47bf
@ -41,12 +41,6 @@ module XMonad.Layout.Spacing
|
|||||||
-- * Modify Borders
|
-- * Modify Borders
|
||||||
, Border (..)
|
, Border (..)
|
||||||
, borderMap, borderIncrementBy
|
, borderMap, borderIncrementBy
|
||||||
|
|
||||||
-- * Backwards Compatibility
|
|
||||||
, SpacingWithEdge
|
|
||||||
, SmartSpacing, SmartSpacingWithEdge
|
|
||||||
, ModifySpacing (..)
|
|
||||||
, setSpacing, incSpacing
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import XMonad
|
import XMonad
|
||||||
@ -220,9 +214,6 @@ instance Eq a => LayoutModifier Spacing a where
|
|||||||
= Just $ s { windowBorder = f wb }
|
= Just $ s { windowBorder = f wb }
|
||||||
| Just (ModifyWindowBorderEnabled f) <- fromMessage m
|
| Just (ModifyWindowBorderEnabled f) <- fromMessage m
|
||||||
= Just $ s { windowBorderEnabled = f wbe }
|
= Just $ s { windowBorderEnabled = f wbe }
|
||||||
| Just (ModifySpacing f) <- fromMessage m
|
|
||||||
= Just $ let f' = borderMap (fromIntegral . f . fromIntegral)
|
|
||||||
in s { screenBorder = f' sb, windowBorder = f' wb }
|
|
||||||
| otherwise
|
| otherwise
|
||||||
= Nothing
|
= Nothing
|
||||||
|
|
||||||
@ -365,25 +356,6 @@ orderSelect o (lt,eq,gt) = case o of
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- Backwards Compatibility:
|
-- Backwards Compatibility:
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
{-# DEPRECATED SpacingWithEdge, SmartSpacing, SmartSpacingWithEdge "Use Spacing instead." #-}
|
|
||||||
{-# DEPRECATED ModifySpacing "Use SpacingModifier instead, perhaps with sendMessages." #-}
|
|
||||||
{-# DEPRECATED setSpacing "Use setScreenWindowSpacing instead." #-}
|
|
||||||
{-# DEPRECATED incSpacing "Use incScreenWindowSpacing instead." #-}
|
|
||||||
|
|
||||||
-- | A type synonym for the 'Spacing' 'LayoutModifier'.
|
|
||||||
type SpacingWithEdge = Spacing
|
|
||||||
|
|
||||||
-- | A type synonym for the 'Spacing' 'LayoutModifier'.
|
|
||||||
type SmartSpacing = Spacing
|
|
||||||
|
|
||||||
-- | A type synonym for the 'Spacing' 'LayoutModifier'.
|
|
||||||
type SmartSpacingWithEdge = Spacing
|
|
||||||
|
|
||||||
-- | Message to dynamically modify (e.g. increase\/decrease\/set) the size of
|
|
||||||
-- the screen spacing and window spacing. See 'SpacingModifier'.
|
|
||||||
newtype ModifySpacing = ModifySpacing (Int -> Int)
|
|
||||||
|
|
||||||
instance Message ModifySpacing
|
|
||||||
|
|
||||||
-- | Surround all windows by a certain number of pixels of blank space. See
|
-- | Surround all windows by a certain number of pixels of blank space. See
|
||||||
-- 'spacingRaw'.
|
-- 'spacingRaw'.
|
||||||
@ -410,11 +382,3 @@ smartSpacing i = spacingRaw True (uniformBorder 0) False (uniformBorder i') True
|
|||||||
smartSpacingWithEdge :: Int -> l a -> ModifiedLayout Spacing l a
|
smartSpacingWithEdge :: Int -> l a -> ModifiedLayout Spacing l a
|
||||||
smartSpacingWithEdge i = spacingRaw True (uniformBorder i') True (uniformBorder i') True
|
smartSpacingWithEdge i = spacingRaw True (uniformBorder i') True (uniformBorder i') True
|
||||||
where i' = fromIntegral i
|
where i' = fromIntegral i
|
||||||
|
|
||||||
-- | See 'setScreenWindowSpacing'.
|
|
||||||
setSpacing :: Int -> X ()
|
|
||||||
setSpacing = setScreenWindowSpacing . fromIntegral
|
|
||||||
|
|
||||||
-- | See 'incScreenWindowSpacing'.
|
|
||||||
incSpacing :: Int -> X ()
|
|
||||||
incSpacing = incScreenWindowSpacing . fromIntegral
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user