Replace statics with labels.

[skip ci]
This commit is contained in:
Rodrigo Girão Serrão
2023-01-06 10:49:25 +00:00
parent a25ba1bea4
commit c7c352a38a
2 changed files with 8 additions and 7 deletions

View File

@@ -18,8 +18,9 @@
text-opacity: 100%; text-opacity: 100%;
} }
Static { Label {
height: 1fr; height: 1fr;
width: 100%;
text-align: center; text-align: center;
text-style: bold; text-style: bold;
} }

View File

@@ -1,14 +1,14 @@
from textual.app import App from textual.app import App
from textual.widgets import Static from textual.widgets import Label
class TextOpacityApp(App): class TextOpacityApp(App):
def compose(self): def compose(self):
yield Static("text-opacity: 0%", id="zero-opacity") yield Label("text-opacity: 0%", id="zero-opacity")
yield Static("text-opacity: 25%", id="quarter-opacity") yield Label("text-opacity: 25%", id="quarter-opacity")
yield Static("text-opacity: 50%", id="half-opacity") yield Label("text-opacity: 50%", id="half-opacity")
yield Static("text-opacity: 75%", id="three-quarter-opacity") yield Label("text-opacity: 75%", id="three-quarter-opacity")
yield Static("text-opacity: 100%", id="full-opacity") yield Label("text-opacity: 100%", id="full-opacity")
app = TextOpacityApp(css_path="text_opacity.css") app = TextOpacityApp(css_path="text_opacity.css")