mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
render lines and scrollbars
This commit is contained in:
@@ -459,6 +459,11 @@ class Region(NamedTuple):
|
||||
height + expand_height * 2,
|
||||
)
|
||||
|
||||
def enlarge(self, size: tuple[int, int]) -> Region:
|
||||
add_width, add_height = size
|
||||
x, y, width, height = self
|
||||
return Region(x, y, width + add_width, height + add_height)
|
||||
|
||||
@lru_cache(maxsize=1024)
|
||||
def overlaps(self, other: Region) -> bool:
|
||||
"""Check if another region overlaps this region.
|
||||
|
||||
Reference in New Issue
Block a user