mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Fix example to use labels.
This commit is contained in:
@@ -4,7 +4,7 @@ Screen {
|
|||||||
layout: horizontal;
|
layout: horizontal;
|
||||||
}
|
}
|
||||||
|
|
||||||
Static {
|
Label {
|
||||||
padding: 1 2;
|
padding: 1 2;
|
||||||
width: 200;
|
width: 200;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from textual.app import App
|
from textual.app import App
|
||||||
from textual.containers import Vertical
|
from textual.containers import Vertical
|
||||||
from textual.widgets import Static
|
from textual.widgets import Label
|
||||||
|
|
||||||
TEXT = """I must not fear.
|
TEXT = """I must not fear.
|
||||||
Fear is the mind-killer.
|
Fear is the mind-killer.
|
||||||
@@ -14,7 +14,7 @@ Where the fear has gone there will be nothing. Only I will remain.
|
|||||||
|
|
||||||
class ScrollbarApp(App):
|
class ScrollbarApp(App):
|
||||||
def compose(self):
|
def compose(self):
|
||||||
yield Vertical(Static(TEXT * 5), classes="panel")
|
yield Vertical(Label(TEXT * 5), classes="panel")
|
||||||
|
|
||||||
|
|
||||||
app = ScrollbarApp(css_path="scrollbar_size.css")
|
app = ScrollbarApp(css_path="scrollbar_size.css")
|
||||||
|
|||||||
Reference in New Issue
Block a user