diff options
-rw-r--r-- | XMonad/Layout/BorderResize.hs | 17 | ||||
-rw-r--r-- | XMonad/Layout/MouseResizableTile.hs | 14 |
2 files changed, 9 insertions, 22 deletions
diff --git a/XMonad/Layout/BorderResize.hs b/XMonad/Layout/BorderResize.hs index ec67a32..ea7337a 100644 --- a/XMonad/Layout/BorderResize.hs +++ b/XMonad/Layout/BorderResize.hs @@ -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 () diff --git a/XMonad/Layout/MouseResizableTile.hs b/XMonad/Layout/MouseResizableTile.hs index 3b02927..56cc5da 100644 --- a/XMonad/Layout/MouseResizableTile.hs +++ b/XMonad/Layout/MouseResizableTile.hs @@ -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 |