Undo some changes to uber sandbox example

This commit is contained in:
Darren Burns
2022-04-26 10:52:10 +01:00
parent 1f54f69ba1
commit 20a8d8bf84
2 changed files with 2 additions and 9 deletions

View File

@@ -1,13 +1,11 @@
#uber1 { #uber1 {
layout: dock; layout: vertical;
docks: x=left/2 y=right/3;
background: dark_green; background: dark_green;
overflow: auto auto; overflow: auto auto;
border: heavy white; border: heavy white;
} }
.list-item { .list-item {
dock: ac2 2;
height: 8; height: 8;
min-width: 80; min-width: 80;
background: dark_blue; background: dark_blue;

View File

@@ -19,7 +19,6 @@ class BasicApp(App):
self.bind("p", "toggle_display") self.bind("p", "toggle_display")
self.bind("f", "modify_focussed") self.bind("f", "modify_focussed")
self.bind("b", "toggle_border") self.bind("b", "toggle_border")
self.bind("m", "increase_margin")
async def on_mount(self): async def on_mount(self):
"""Build layout here.""" """Build layout here."""
@@ -81,11 +80,7 @@ class BasicApp(App):
self.focused.display = not self.focused.display self.focused.display = not self.focused.display
def action_toggle_border(self): def action_toggle_border(self):
self.focused.styles.border = [("solid", "red"), ("solid", "white")] self.focused.styles.border = [("solid", "red"), ("dashed", "white")]
def action_increase_margin(self):
old_margin = self.focused.styles.margin
self.focused.styles.border = [("solid", "green"), ("dashed", "red")]
BasicApp.run(css_file="uber.css", log="textual.log", log_verbosity=1) BasicApp.run(css_file="uber.css", log="textual.log", log_verbosity=1)