Tidying up, applying opacity if it exists in styles

This commit is contained in:
Darren Burns
2022-02-11 11:46:04 +00:00
parent 43696294d2
commit 80251e3234
4 changed files with 14 additions and 10 deletions

View File

@@ -18,6 +18,7 @@ class BasicApp(App):
self.bind("tab", "toggle_class('#sidebar', '-active')")
self.bind("a", "toggle_class('#header', '-visible')")
self.bind("c", "toggle_class('#content', '-content-visible')")
self.bind("d", "toggle_class('#footer', 'dim')")
def on_mount(self):
"""Build layout here."""

View File

@@ -34,7 +34,6 @@ Widget:hover {
#header {
text: $text on $primary;
opacity: 0.2;
height: 3;
border-bottom: hkey $secondary;
}
@@ -53,7 +52,12 @@ Widget:hover {
}
#footer {
opacity: 1;
text: $text on $primary;
height: 3;
border-top: hkey $secondary;
}
#footer.dim {
opacity: 0.5;
}