Merge pull request #1082 from Textualize/size-micro-op

optimization
This commit is contained in:
Will McGugan
2022-11-01 09:35:33 +00:00
committed by GitHub

View File

@@ -427,7 +427,7 @@ class Region(NamedTuple):
Offset: Top left offset.
"""
return Offset(self.x, self.y)
return Offset(*self[:2])
@property
def bottom_left(self) -> Offset:
@@ -470,7 +470,7 @@ class Region(NamedTuple):
Size: Size of the region.
"""
return Size(self.width, self.height)
return Size(*self[2:])
@property
def corners(self) -> tuple[int, int, int, int]: