mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-20 02:59:19 +01:00
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:
parent
04550de173
commit
af3e887a1d
@ -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(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user