mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Change statics to labels.
This commit is contained in:
@@ -4,7 +4,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#box2 {
|
#box2 {
|
||||||
content-align: center middle;
|
content-align-horizontal: center;
|
||||||
|
content-align-vertical: middle;
|
||||||
background: green;
|
background: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13,7 +14,8 @@
|
|||||||
background: blue;
|
background: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Static {
|
Label {
|
||||||
|
width: 100%;
|
||||||
height: 1fr;
|
height: 1fr;
|
||||||
padding: 1;
|
padding: 1;
|
||||||
color: white;
|
color: white;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
from textual.app import App
|
from textual.app import App
|
||||||
from textual.widgets import Static
|
from textual.widgets import Label
|
||||||
|
|
||||||
|
|
||||||
class ContentAlignApp(App):
|
class ContentAlignApp(App):
|
||||||
def compose(self):
|
def compose(self):
|
||||||
yield Static("With [i]content-align[/] you can...", id="box1")
|
yield Label("With [i]content-align[/] you can...", id="box1")
|
||||||
yield Static("...[b]Easily align content[/]...", id="box2")
|
yield Label("...[b]Easily align content[/]...", id="box2")
|
||||||
yield Static("...Horizontally [i]and[/] vertically!", id="box3")
|
yield Label("...Horizontally [i]and[/] vertically!", id="box3")
|
||||||
|
|
||||||
|
|
||||||
app = ContentAlignApp(css_path="content_align.css")
|
app = ContentAlignApp(css_path="content_align.css")
|
||||||
|
|||||||
Reference in New Issue
Block a user