mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Replace statics with labels.
[skip ci]
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user