mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Comments
This commit is contained in:
@@ -259,16 +259,19 @@ class Region(NamedTuple):
|
||||
|
||||
@property
|
||||
def bottom_left(self) -> Offset:
|
||||
"""Bottom left offset of the region."""
|
||||
x, y, _width, height = self
|
||||
return Offset(x, y + height)
|
||||
|
||||
@property
|
||||
def top_right(self) -> Offset:
|
||||
"""Top right offset of the region."""
|
||||
x, y, width, _height = self
|
||||
return Offset(x + width, y)
|
||||
|
||||
@property
|
||||
def bottom_right(self) -> Offset:
|
||||
"""Bottom right of the region."""
|
||||
x, y, width, height = self
|
||||
return Offset(x + width, y + height)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user