mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Undo some changes to uber sandbox example
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
#uber1 {
|
||||
layout: dock;
|
||||
docks: x=left/2 y=right/3;
|
||||
layout: vertical;
|
||||
background: dark_green;
|
||||
overflow: auto auto;
|
||||
border: heavy white;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
dock: ac2 2;
|
||||
height: 8;
|
||||
min-width: 80;
|
||||
background: dark_blue;
|
||||
|
||||
@@ -19,7 +19,6 @@ class BasicApp(App):
|
||||
self.bind("p", "toggle_display")
|
||||
self.bind("f", "modify_focussed")
|
||||
self.bind("b", "toggle_border")
|
||||
self.bind("m", "increase_margin")
|
||||
|
||||
async def on_mount(self):
|
||||
"""Build layout here."""
|
||||
@@ -81,11 +80,7 @@ class BasicApp(App):
|
||||
self.focused.display = not self.focused.display
|
||||
|
||||
def action_toggle_border(self):
|
||||
self.focused.styles.border = [("solid", "red"), ("solid", "white")]
|
||||
|
||||
def action_increase_margin(self):
|
||||
old_margin = self.focused.styles.margin
|
||||
self.focused.styles.border = [("solid", "green"), ("dashed", "red")]
|
||||
self.focused.styles.border = [("solid", "red"), ("dashed", "white")]
|
||||
|
||||
|
||||
BasicApp.run(css_file="uber.css", log="textual.log", log_verbosity=1)
|
||||
|
||||
Reference in New Issue
Block a user