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