mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
30 lines
505 B
Python
30 lines
505 B
Python
from textual.app import App
|
|
from textual import layout
|
|
from textual.widget import Widget
|
|
|
|
|
|
class FiftyApp(App):
|
|
|
|
CSS = """
|
|
Screen {
|
|
layout: vertical;
|
|
}
|
|
Horizontal {
|
|
height: 50%;
|
|
}
|
|
Widget {
|
|
width: 50%;
|
|
outline: white;
|
|
background: blue;
|
|
}
|
|
|
|
"""
|
|
|
|
def compose(self):
|
|
yield layout.Horizontal(Widget(), Widget())
|
|
yield layout.Horizontal(Widget(), Widget())
|
|
|
|
app = FiftyApp()
|
|
if __name__ == "__main__":
|
|
app.run()
|