-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""A simple footer with a clock, that can also have its bindings refreshed.""" | ||
|
||
from textual.app import ComposeResult | ||
from textual.widgets import Footer as TextualFooter | ||
|
||
from ._clock import Clock | ||
|
||
|
||
class Footer(TextualFooter): | ||
""" | ||
The footer for the stockyard app. | ||
This is required to be able to call the `refresh_bindings` method without | ||
triggering pyright errors. | ||
""" | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
self._clock: Clock = Clock() | ||
|
||
def compose(self) -> ComposeResult: | ||
yield self._clock | ||
|
||
def refresh_bindings(self) -> None: | ||
"""Expose the binding refresh for the footer.""" | ||
|
||
self._bindings_changed(None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters