mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-29 19:21:51 -07:00
Use more imported cursor constants.
This commit is contained in:
XMonad/Layout
@@ -63,15 +63,6 @@ brBorderOffset = 5
|
|||||||
brBorderSize :: Dimension
|
brBorderSize :: Dimension
|
||||||
brBorderSize = 10
|
brBorderSize = 10
|
||||||
|
|
||||||
brCursorRightSide :: Glyph
|
|
||||||
brCursorRightSide = 96
|
|
||||||
brCursorLeftSide :: Glyph
|
|
||||||
brCursorLeftSide = 70
|
|
||||||
brCursorTopSide :: Glyph
|
|
||||||
brCursorTopSide = 138
|
|
||||||
brCursorBottomSide :: Glyph
|
|
||||||
brCursorBottomSide = 16
|
|
||||||
|
|
||||||
borderResize :: l a -> ModifiedLayout BorderResize l a
|
borderResize :: l a -> ModifiedLayout BorderResize l a
|
||||||
borderResize = ModifiedLayout (BR M.empty)
|
borderResize = ModifiedLayout (BR M.empty)
|
||||||
|
|
||||||
@@ -155,10 +146,10 @@ createBorderLookupTable wrsLastTime = concat $ map processSingleEntry $ M.toList
|
|||||||
|
|
||||||
prepareBorders :: Rectangle -> [BorderBlueprint]
|
prepareBorders :: Rectangle -> [BorderBlueprint]
|
||||||
prepareBorders (Rectangle x y wh ht) =
|
prepareBorders (Rectangle x y wh ht) =
|
||||||
[((Rectangle (x + fi wh - brBorderOffset) y brBorderSize ht), brCursorRightSide , RightSideBorder),
|
[((Rectangle (x + fi wh - brBorderOffset) y brBorderSize ht), xC_right_side , RightSideBorder),
|
||||||
((Rectangle (x - brBorderOffset) y brBorderSize ht) , brCursorLeftSide , LeftSideBorder),
|
((Rectangle (x - brBorderOffset) y brBorderSize ht) , xC_left_side , LeftSideBorder),
|
||||||
((Rectangle x (y - brBorderOffset) wh brBorderSize) , brCursorTopSide , TopSideBorder),
|
((Rectangle x (y - brBorderOffset) wh brBorderSize) , xC_top_side , TopSideBorder),
|
||||||
((Rectangle x (y + fi ht - brBorderOffset) wh brBorderSize), brCursorBottomSide , BottomSideBorder)
|
((Rectangle x (y + fi ht - brBorderOffset) wh brBorderSize), xC_bottom_side, BottomSideBorder)
|
||||||
]
|
]
|
||||||
|
|
||||||
handleResize :: [(Window, (BorderType, Window, Rectangle))] -> Event -> X ()
|
handleResize :: [(Window, (BorderType, Window, Rectangle))] -> Event -> X ()
|
||||||
|
@@ -90,10 +90,6 @@ mrtDraggerOffset :: Position
|
|||||||
mrtDraggerOffset = 3
|
mrtDraggerOffset = 3
|
||||||
mrtDraggerSize :: Dimension
|
mrtDraggerSize :: Dimension
|
||||||
mrtDraggerSize = 6
|
mrtDraggerSize = 6
|
||||||
mrtHDoubleArrow :: Glyph
|
|
||||||
mrtHDoubleArrow = 108
|
|
||||||
mrtVDoubleArrow :: Glyph
|
|
||||||
mrtVDoubleArrow = 116
|
|
||||||
|
|
||||||
mouseResizableTile :: MouseResizableTile a
|
mouseResizableTile :: MouseResizableTile a
|
||||||
mouseResizableTile = MRT 1 mrtFraction [] [] [] 0 0 False
|
mouseResizableTile = MRT 1 mrtFraction [] [] [] 0 0 False
|
||||||
@@ -155,9 +151,9 @@ adjustForMirror False dragger = dragger
|
|||||||
adjustForMirror True (draggerRect, draggerCursor, draggerInfo) =
|
adjustForMirror True (draggerRect, draggerCursor, draggerInfo) =
|
||||||
(mirrorRect draggerRect, draggerCursor', draggerInfo)
|
(mirrorRect draggerRect, draggerCursor', draggerInfo)
|
||||||
where
|
where
|
||||||
draggerCursor' = if (draggerCursor == mrtHDoubleArrow)
|
draggerCursor' = if (draggerCursor == xC_sb_h_double_arrow)
|
||||||
then mrtVDoubleArrow
|
then xC_sb_v_double_arrow
|
||||||
else mrtHDoubleArrow
|
else xC_sb_h_double_arrow
|
||||||
|
|
||||||
modifySlave :: MouseResizableTile a -> Rational-> MouseResizableTile a
|
modifySlave :: MouseResizableTile a -> Rational-> MouseResizableTile a
|
||||||
modifySlave state delta =
|
modifySlave state delta =
|
||||||
@@ -217,12 +213,12 @@ splitVertically (f:fx) (Rectangle sx sy sw sh) isLeft num =
|
|||||||
draggerInfo = if isLeft
|
draggerInfo = if isLeft
|
||||||
then LeftSlaveDragger sy (fromIntegral sh) num
|
then LeftSlaveDragger sy (fromIntegral sh) num
|
||||||
else RightSlaveDragger sy (fromIntegral sh) num
|
else RightSlaveDragger sy (fromIntegral sh) num
|
||||||
nextDragger = (draggerRect, mrtVDoubleArrow, draggerInfo)
|
nextDragger = (draggerRect, xC_sb_v_double_arrow, draggerInfo)
|
||||||
in (nextRect : otherRects, nextDragger : otherDragger)
|
in (nextRect : otherRects, nextDragger : otherDragger)
|
||||||
where smallh = floor $ fromIntegral sh * f
|
where smallh = floor $ fromIntegral sh * f
|
||||||
|
|
||||||
splitHorizontallyBy :: RealFrac r => r -> Rectangle -> ((Rectangle, Rectangle), DraggerWithRect)
|
splitHorizontallyBy :: RealFrac r => r -> Rectangle -> ((Rectangle, Rectangle), DraggerWithRect)
|
||||||
splitHorizontallyBy f (Rectangle sx sy sw sh) = ((leftHalf, rightHalf), (draggerRect, mrtHDoubleArrow, draggerInfo))
|
splitHorizontallyBy f (Rectangle sx sy sw sh) = ((leftHalf, rightHalf), (draggerRect, xC_sb_h_double_arrow, draggerInfo))
|
||||||
where leftw = floor $ fromIntegral sw * f
|
where leftw = floor $ fromIntegral sw * f
|
||||||
leftHalf = Rectangle sx sy (leftw - mrtDraggerSize `div` 2) sh
|
leftHalf = Rectangle sx sy (leftw - mrtDraggerSize `div` 2) sh
|
||||||
rightHalf = Rectangle (sx + fromIntegral leftw + mrtDraggerOffset) sy
|
rightHalf = Rectangle (sx + fromIntegral leftw + mrtDraggerOffset) sy
|
||||||
|
Reference in New Issue
Block a user