mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
behaviour -> behavior
This commit is contained in:
@@ -105,7 +105,7 @@ As mentioned earlier, widgets expand to fill the _width_ of their parent contain
|
|||||||
They do not, however, expand to fill the container's height.
|
They do not, however, expand to fill the container's height.
|
||||||
Thus, we need explicitly assign `height: 100%` to achieve this.
|
Thus, we need explicitly assign `height: 100%` to achieve this.
|
||||||
|
|
||||||
A consequence of this "horizontal growth" behaviour is that if we remove the width restriction from the above example (by deleting `width: 1fr;`), each child widget will grow to fit the width of the screen,
|
A consequence of this "horizontal growth" behavior is that if we remove the width restriction from the above example (by deleting `width: 1fr;`), each child widget will grow to fit the width of the screen,
|
||||||
and only the first widget will be visible.
|
and only the first widget will be visible.
|
||||||
The other two widgets in our layout are offscreen, to the right-hand side of the screen.
|
The other two widgets in our layout are offscreen, to the right-hand side of the screen.
|
||||||
In the case of `horizontal` layout, Textual will _not_ automatically add a scrollbar.
|
In the case of `horizontal` layout, Textual will _not_ automatically add a scrollbar.
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ The color is parsed in `on_input_submitted` and assigned to `self.color`. Becaus
|
|||||||
|
|
||||||
Textual only calls watch methods if the value of a reactive attribute _changes_.
|
Textual only calls watch methods if the value of a reactive attribute _changes_.
|
||||||
If the newly assigned value is the same as the previous value, the watch method is not called.
|
If the newly assigned value is the same as the previous value, the watch method is not called.
|
||||||
You can override this behaviour by passing `always_update=True` to `reactive`.
|
You can override this behavior by passing `always_update=True` to `reactive`.
|
||||||
|
|
||||||
|
|
||||||
### Dynamically watching reactive attributes
|
### Dynamically watching reactive attributes
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ This immediately updates the appearance of the `TextArea`:
|
|||||||
```{.textual path="docs/examples/widgets/text_area_custom_theme.py" columns="42" lines="8"}
|
```{.textual path="docs/examples/widgets/text_area_custom_theme.py" columns="42" lines="8"}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Tab and Escape behaviour
|
### Tab and Escape behavior
|
||||||
|
|
||||||
Pressing the ++tab++ key will shift focus to the next widget in your application by default.
|
Pressing the ++tab++ key will shift focus to the next widget in your application by default.
|
||||||
This matches how other widgets work in Textual.
|
This matches how other widgets work in Textual.
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class DocumentNavigator:
|
|||||||
may move your cursor to a position further along the current raw document line,
|
may move your cursor to a position further along the current raw document line,
|
||||||
rather than on to the next line in the raw document.
|
rather than on to the next line in the raw document.
|
||||||
|
|
||||||
The DocumentNavigator class manages that behaviour.
|
The DocumentNavigator class manages that behavior.
|
||||||
|
|
||||||
Given a cursor location in the unwrapped document, and a cursor movement action,
|
Given a cursor location in the unwrapped document, and a cursor movement action,
|
||||||
this class can inform us of the destination the cursor will move to considering
|
this class can inform us of the destination the cursor will move to considering
|
||||||
@@ -49,9 +49,9 @@ class DocumentNavigator:
|
|||||||
document-space line. This is a codepoint index, rather than a visual offset.
|
document-space line. This is a codepoint index, rather than a visual offset.
|
||||||
In "ABCDEF" with wrapping at width 3, there is a single wrap offset of 3.
|
In "ABCDEF" with wrapping at width 3, there is a single wrap offset of 3.
|
||||||
|
|
||||||
"Smart home" refers to a modification of the "home" key behaviour. If smart home is
|
"Smart home" refers to a modification of the "home" key behavior. If smart home is
|
||||||
enabled, the first non-whitespace character is considered to be the home location.
|
enabled, the first non-whitespace character is considered to be the home location.
|
||||||
If the cursor is currently at this position, then the normal home behaviour applies.
|
If the cursor is currently at this position, then the normal home behavior applies.
|
||||||
This is designed to make cursor movement more useful to end users.
|
This is designed to make cursor movement more useful to end users.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -389,7 +389,7 @@ class DocumentNavigator:
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
location: The location to consider.
|
location: The location to consider.
|
||||||
smart_home: Enable/disable 'smart home' behaviour.
|
smart_home: Enable/disable 'smart home' behavior.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The home location, relative to the given location.
|
The home location, relative to the given location.
|
||||||
|
|||||||
Reference in New Issue
Block a user