-
Notifications
You must be signed in to change notification settings - Fork 822
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
1 parent
99235b0
commit 236d839
Showing
6 changed files
with
58 additions
and
52 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from rich.markdown import Markdown | ||
from textual.app import App, ComposeResult | ||
from textual.containers import Grid, Vertical | ||
from textual.widgets import Label, TabbedContent, TabPane | ||
|
||
|
||
class FooApp(App): | ||
TITLE = "Demonstrator" | ||
|
||
CSS = """ | ||
Screen { | ||
align: center middle; | ||
} | ||
#root { | ||
width: 60; | ||
height: 20; | ||
border: solid $accent; | ||
} | ||
.info-container { | ||
grid-rows: auto; | ||
} | ||
.value { | ||
padding: 0 2; | ||
border: tall $background; | ||
} | ||
""" | ||
|
||
def compose(self) -> ComposeResult: | ||
with Vertical(id="root"): | ||
with TabbedContent(): | ||
with TabPane("Information"): | ||
with Grid(classes="info-container"): | ||
yield Label(Markdown(long_text()), classes="value") | ||
|
||
|
||
def long_text() -> str: | ||
return 'aaa naa aaaaa aaa aaaan, aaa\naaa, aaaa?", aa aaa aaaaanaaa *anaaaaaaana* aaaaaaaa aaaaaana aaa aaaaa aa\naaa, aa *aaaaaaaaa* aaa aaaa, "aaaa, an *aaaa* aaa aaaa, a aa". "aaaa, naa\naaaaaaaaaaa, aaa a aaaa aaaaaanaa aaaa aa a aaa!", aaa anaaaa, aaaaa\naaaaaaaa aanaaaaa. "Na! aaa naa. aaaaa. aa aaaaa naa. aaaaa aa na aaa.",\naaa aaaaaaaa aaaanaaaaa DONE.\n' | ||
|
||
|
||
if __name__ == "__main__": | ||
FooApp().run() |
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