File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class SharpnessChart(ScrollView):
4444 ]
4545
4646 COMPONENT_CLASSES = {
47+ "sharpness-chart--background" ,
4748 "sharpness-chart--selected" ,
4849 "sharpness-chart--unselected" ,
4950 "sharpness-chart--title" ,
@@ -57,19 +58,25 @@ class SharpnessChart(ScrollView):
5758 margin: 1 0;
5859 overflow-x: auto;
5960 overflow-y: hidden;
61+ background: $background;
6062 }
6163
6264 SharpnessChart:focus {
6365 border: tall $accent;
6466 }
6567
68+ SharpnessChart .sharpness-chart--background {
69+ color: $background;
70+ background: $background;
71+ }
72+
6673 SharpnessChart .sharpness-chart--selected {
6774 color: $primary-lighten-2;
6875 text-style: bold;
6976 }
7077
7178 SharpnessChart .sharpness-chart--unselected {
72- color: $primary-darken-2 ;
79+ color: $text-muted ;
7380 }
7481
7582 SharpnessChart .sharpness-chart--title {
@@ -133,7 +140,9 @@ def action_last_frame(self) -> None:
133140
134141 def render_line (self , y : int ) -> Strip :
135142 """Render only the visible frame window at the current scroll offset."""
136- blank_style = Style ()
143+ blank_style = self .get_component_rich_style (
144+ "sharpness-chart--background"
145+ )
137146 width = self .size .width
138147 viewport_height = self .scrollable_content_region .height
139148 if width < 1 or y >= viewport_height :
Original file line number Diff line number Diff line change @@ -185,6 +185,10 @@ def compose(self) -> ComposeResult:
185185 assert chart .max_scroll_x > 9_000
186186 assert chart .max_scroll_y == 0
187187 assert chart .render_line (1 ).cell_length == chart .size .width
188+ background_style = chart .get_component_rich_style (
189+ "sharpness-chart--background"
190+ )
191+ assert background_style .bgcolor is not None
188192 assert "Frames 1-39 of 5,000" in chart .render_line (0 ).text
189193 bottom_line = chart .render_line (chart .scrollable_content_region .height - 1 )
190194 assert bottom_line .text [:8 ] == "█ █ █ █ "
You can’t perform that action at this time.
0 commit comments