mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Use labels instead of statics.
This commit is contained in:
@@ -2,7 +2,7 @@ Screen {
|
|||||||
background: white;
|
background: white;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
Static {
|
Label {
|
||||||
margin: 4 8;
|
margin: 4 8;
|
||||||
background: green 20%;
|
background: green 20%;
|
||||||
outline: wide green;
|
outline: wide green;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from textual.app import App
|
from textual.app import App
|
||||||
from textual.widgets import Static
|
from textual.widgets import Label
|
||||||
|
|
||||||
|
|
||||||
TEXT = """I must not fear.
|
TEXT = """I must not fear.
|
||||||
@@ -13,7 +13,7 @@ Where the fear has gone there will be nothing. Only I will remain."""
|
|||||||
|
|
||||||
class OutlineApp(App):
|
class OutlineApp(App):
|
||||||
def compose(self):
|
def compose(self):
|
||||||
yield Static(TEXT)
|
yield Label(TEXT)
|
||||||
|
|
||||||
|
|
||||||
app = OutlineApp(css_path="outline.css")
|
app = OutlineApp(css_path="outline.css")
|
||||||
|
|||||||
Reference in New Issue
Block a user