Updating progress bar colors

This commit is contained in:
Darren Burns
2024-10-24 10:39:53 +01:00
parent e3e063d0f1
commit bded1bc818
3 changed files with 8 additions and 8 deletions

View File

@@ -16,9 +16,9 @@ from textual.widgets import (
Label,
ListItem,
ListView,
LoadingIndicator,
MarkdownViewer,
OptionList,
ProgressBar,
RadioSet,
RichLog,
Select,
@@ -267,7 +267,9 @@ class ChangingThemeApp(App[None]):
with Collapsible(title="An interesting story."):
yield Label("Interesting but verbose story.")
yield LoadingIndicator()
progress = ProgressBar(total=100)
progress.advance(70)
yield progress
rich_log = RichLog(highlight=True, markup=True)
rich_log.write("Hello, world!")

View File

@@ -102,8 +102,6 @@ BUILTIN_THEMES: dict[str, Theme] = {
"block-cursor-foreground": "#2E3440",
"block-cursor-text-style": "none",
"footer-key-foreground": "#88C0D0",
"input-cursor-foreground": "#2E3440",
"input-cursor-background": "#88C0D0",
"input-selection-background": "#81a1c1 35%",
},
),

View File

@@ -44,16 +44,16 @@ class Bar(Widget, can_focus=False):
height: 1;
&> .bar--bar {
color: $warning;
background: $foreground 10%;
color: $primary;
background: $surface;
}
&> .bar--indeterminate {
color: $error;
background: $foreground 10%;
background: $surface;
}
&> .bar--complete {
color: $success;
background: $foreground 10%;
background: $surface;
}
}
"""