Adjust ScreenWindow's drag regions

The union of new regions is the window area sans the screen view and the
bottom right corner. This differs from the old regions when the
resolution is too small for the screen view to occupy the entirety of
the window's inner width.
This commit is contained in:
Fingercomp 2025-07-31 22:57:59 +03:00
parent 04550de173
commit af3e887a1d
No known key found for this signature in database
GPG Key ID: BBC71CEE45D86E37

View File

@ -128,12 +128,12 @@ class ScreenWindow(screenNode: ScreenNode) extends PanelWindow with Logging {
} }
override protected def dragRegions: Iterator[Rect2D] = Iterator( override protected def dragRegions: Iterator[Rect2D] = Iterator(
Rect2D(position.x, position.y, size.width, BorderTop.toFloat), Rect2D(position.x, position.y, size.width, View.position.y - position.y),
Rect2D(position.x, position.y, BorderLeft.toFloat, size.height), Rect2D(position.x, position.y, View.position.x - position.x, size.height),
// these two must not include `scaleDragRegion` // these two must not include `scaleDragRegion`
Rect2D(position.x, position.y + size.height - BorderBottom, size.width - BorderRight, BorderBottom.toFloat), Rect2D(position.x, View.bounds.max.y, size.width - BorderRight, bounds.max.y - View.bounds.max.y),
Rect2D(position.x + size.width - BorderRight, position.y, BorderRight.toFloat, size.height - BorderBottom), Rect2D(View.bounds.max.x, position.y, bounds.max.y - View.bounds.max.y, size.height - BorderBottom),
) )
private def scaleDragRegion: Rect2D = Rect2D( private def scaleDragRegion: Rect2D = Rect2D(