mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
doc update
This commit is contained in:
2
poetry.lock
generated
2
poetry.lock
generated
@@ -345,7 +345,7 @@ mkdocs = ">=1.1"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mkdocs-material"
|
name = "mkdocs-material"
|
||||||
version = "8.3.9"
|
version = "8.4.1"
|
||||||
description = "Documentation that simply works"
|
description = "Documentation that simply works"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
"""
|
"""
|
||||||
Manages Color in Textual.
|
Manages Color in Textual.
|
||||||
|
|
||||||
All instances where the developer is presented with a color should use this class. The only
|
All instances where the developer is presented with a color will use this class. The only
|
||||||
exception should be when passing things to a Rich renderable, which will need to use the
|
exception should be when passing things to a Rich renderable, which will need to use the
|
||||||
`rich_color` attribute to perform a conversion.
|
`rich_color` attribute to perform a conversion.
|
||||||
|
|
||||||
I'm not entirely happy with burdening the user with two similar color classes. In a future
|
|
||||||
update we might add a protocol to convert automatically so the dev could use them interchangeably.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|||||||
@@ -357,12 +357,13 @@ class Region(NamedTuple):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def column_span(self) -> tuple[int, int]:
|
def column_span(self) -> tuple[int, int]:
|
||||||
"""Get the start and end column (x coord).
|
"""Get the start and end columns (x coord).
|
||||||
|
|
||||||
The end value is exclusive.
|
The end value is exclusive.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
tuple[int, int]: Pair of x coordinates (column numbers).
|
tuple[int, int]: Pair of x coordinates (column numbers).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return (self.x, self.x + self.width)
|
return (self.x, self.x + self.width)
|
||||||
|
|
||||||
@@ -374,6 +375,7 @@ class Region(NamedTuple):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
tuple[int, int]: Pair of y coordinates (line numbers).
|
tuple[int, int]: Pair of y coordinates (line numbers).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return (self.y, self.y + self.height)
|
return (self.y, self.y + self.height)
|
||||||
|
|
||||||
@@ -402,7 +404,7 @@ class Region(NamedTuple):
|
|||||||
"""Get the area within the region.
|
"""Get the area within the region.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: area.
|
int: Area covered by this region.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return self.width * self.height
|
return self.width * self.height
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ from typing import (
|
|||||||
ClassVar,
|
ClassVar,
|
||||||
Collection,
|
Collection,
|
||||||
Iterable,
|
Iterable,
|
||||||
Iterator,
|
|
||||||
NamedTuple,
|
NamedTuple,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user