Improve window dragging

This commit is contained in:
2026-04-06 01:12:25 +01:00
parent 1f52c4b588
commit c041a4d174
2 changed files with 7 additions and 2 deletions
+5 -2
View File
@@ -134,8 +134,11 @@ setPixelOffsetBounded cfig (V2 x y) ldp = ldp & ldpPos . spPixelOff .~ V2 x' y'
where
h = fromIntegral $ cfig ^. windowY
w = fromIntegral $ cfig ^. windowX
x' = min (w - (1+10*ldp ^?! ldpSize . _Just . _x . to fromIntegral)) $ max 1 x
y' = max (1+20*(ldp^.ldpVerticalGap + ldp^?!ldpSize._Just._y.to fromIntegral)-h) y
x' = min (w - (w*a + 1+10*ldp ^?! ldpSize . _Just . _x . to fromIntegral))
$ max (1 - w * a) x
y' = min (h-(h*b + 40))
$ max (1+20*(ldp^.ldpVerticalGap + ldp^?!ldpSize._Just._y.to fromIntegral)-h*b) y
V2 a b = ldp ^. ldpPos . spScreenOff
--leftHeldPosShift :: World -> Point2
--leftHeldPosShift w = fromMaybe 0 $ do