XMonad.Layout.Spacing: Remove deprecations

This commit is contained in:
slotThe 2020-11-16 14:45:14 +01:00 committed by Tony Zorman
parent 16701c2df2
commit d8a23d47bf

View File

@ -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