mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
@@ -8,7 +8,7 @@ from textual.widgets import Placeholder
|
||||
|
||||
|
||||
class VerticalContainer(Widget):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
VerticalContainer {
|
||||
layout: vertical;
|
||||
overflow: hidden auto;
|
||||
@@ -24,7 +24,7 @@ class VerticalContainer(Widget):
|
||||
|
||||
|
||||
class Introduction(Widget):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
Introduction {
|
||||
background: indigo;
|
||||
color: white;
|
||||
|
||||
@@ -23,7 +23,7 @@ class ColorDisplay(Widget, can_focus=True):
|
||||
|
||||
|
||||
class ColorNames(App):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
ColorDisplay {
|
||||
height: 1;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ from textual.widget import Widget
|
||||
|
||||
class FiftyApp(App):
|
||||
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
Screen {
|
||||
layout: vertical;
|
||||
}
|
||||
@@ -24,6 +24,7 @@ class FiftyApp(App):
|
||||
yield layout.Horizontal(Widget(), Widget())
|
||||
yield layout.Horizontal(Widget(), Widget())
|
||||
|
||||
|
||||
app = FiftyApp()
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
|
||||
@@ -9,7 +9,7 @@ placeholders_count = 12
|
||||
|
||||
|
||||
class VerticalContainer(Widget):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
VerticalContainer {
|
||||
layout: vertical;
|
||||
overflow: hidden auto;
|
||||
@@ -26,7 +26,7 @@ class VerticalContainer(Widget):
|
||||
|
||||
|
||||
class Introduction(Widget):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
Introduction {
|
||||
background: indigo;
|
||||
color: white;
|
||||
|
||||
@@ -10,7 +10,7 @@ initial_placeholders_count = 4
|
||||
|
||||
|
||||
class VerticalContainer(Widget):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
VerticalContainer {
|
||||
layout: vertical;
|
||||
overflow: hidden auto;
|
||||
@@ -30,7 +30,7 @@ class VerticalContainer(Widget):
|
||||
|
||||
|
||||
class Introduction(Widget):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
Introduction {
|
||||
background: indigo;
|
||||
color: white;
|
||||
|
||||
@@ -11,7 +11,7 @@ class Thing(Static):
|
||||
|
||||
|
||||
class AddRemoveApp(App):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
#buttons {
|
||||
dock: top;
|
||||
height: auto;
|
||||
|
||||
@@ -3,7 +3,7 @@ from textual.widgets import Static
|
||||
|
||||
|
||||
class CenterApp(App):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
|
||||
CenterApp Screen {
|
||||
layout: center;
|
||||
|
||||
@@ -4,7 +4,7 @@ from textual.widgets import Static
|
||||
|
||||
|
||||
class CenterApp(App):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
|
||||
#sidebar {
|
||||
dock: left;
|
||||
|
||||
@@ -10,7 +10,7 @@ from textual.widget import Widget
|
||||
|
||||
|
||||
class Box(Widget, can_focus=True):
|
||||
CSS = "#box {background: blue;}"
|
||||
DEFAULT_CSS = "#box {background: blue;}"
|
||||
|
||||
def render(self) -> RenderableType:
|
||||
return Panel("Box")
|
||||
|
||||
@@ -21,7 +21,7 @@ class NewScreen(Screen):
|
||||
|
||||
|
||||
class ScreenApp(App):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
ScreenApp Screen {
|
||||
background: #111144;
|
||||
color: white;
|
||||
|
||||
@@ -5,7 +5,7 @@ from textual.widgets import DirectoryTree
|
||||
|
||||
|
||||
class TreeApp(App):
|
||||
CSS = """
|
||||
DEFAULT_CSS = """
|
||||
Screen {
|
||||
overflow: auto;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user