File size: 477 Bytes
2c3c408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from textual.app import App
from textual.widgets import Static


class CenterApp(App):
    DEFAULT_CSS = """
    
    CenterApp Screen {
        layout: center;
        overflow: auto auto;
    }

    CenterApp Static {
        border: wide $primary;
        background: $panel;
        width: 50;
        height: 20;
        margin: 1 2;
        content-align: center middle;
    }
    
    """

    def compose(self):
        yield Static("Hello World!")


app = CenterApp()