mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
spacing diagram
This commit is contained in:
BIN
reference/spacing.monopic
Normal file
BIN
reference/spacing.monopic
Normal file
Binary file not shown.
@@ -853,7 +853,7 @@ class Region(NamedTuple):
|
||||
|
||||
Args:
|
||||
cut: An offset from self.y where the cut should be made. May be negative,
|
||||
for the offset to start from the bottom edge.
|
||||
for the offset to start from the lower edge.
|
||||
|
||||
Returns:
|
||||
Two regions, which add up to the original (self).
|
||||
@@ -909,7 +909,19 @@ class Region(NamedTuple):
|
||||
class Spacing(NamedTuple):
|
||||
"""The spacing around a renderable, such as padding and border
|
||||
|
||||
Spacing is defined by four integers for the space at the top, right, bottom, and left of a region,
|
||||
Spacing is defined by four integers for the space at the top, right, bottom, and left of a region.
|
||||
|
||||
```
|
||||
┌ ─ ─ ─ ─ ─ ─ ─▲─ ─ ─ ─ ─ ─ ─ ─ ┐
|
||||
│ top
|
||||
│ ┏━━━━━▼━━━━━━┓ │
|
||||
◀──────▶┃ ┃◀───────▶
|
||||
│ left ┃ ┃ right │
|
||||
┃ ┃
|
||||
│ ┗━━━━━▲━━━━━━┛ │
|
||||
│ bottom
|
||||
└ ─ ─ ─ ─ ─ ─ ─▼─ ─ ─ ─ ─ ─ ─ ─ ┘
|
||||
```
|
||||
|
||||
Example:
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user