feat(palette): sixteen ANSI colour ladders, cycled with c
This commit is contained in:
1 parent
253b462df1
commit
43ddd8666b
14 files changed
+622
-111
No files matched your search
@@ -10,7 +10,7 @@ from rich.text import Text
|
||||
from textual.widget import Widget
|
||||
|
||||
from . import frame
|
||||
from .common import compact_count, truncate
|
||||
from .common import active_stops, compact_count, truncate
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..app import BeefyPlayerApp
|
||||
@@ -83,6 +83,7 @@ class StationList(Widget):
|
||||
app = cast("BeefyPlayerApp", self.app)
|
||||
width = max(12, self.size.width)
|
||||
height = max(3, self.size.height)
|
||||
stops = active_stops(app)
|
||||
inner_width, inner_height = frame.inner_size(width, height)
|
||||
view = app.view
|
||||
|
||||
@@ -93,6 +94,7 @@ class StationList(Widget):
|
||||
width,
|
||||
height,
|
||||
self.border_title,
|
||||
stops,
|
||||
)
|
||||
|
||||
total = len(view)
|
||||
@@ -167,4 +169,4 @@ class StationList(Widget):
|
||||
)
|
||||
lines.append(row)
|
||||
|
||||
return frame.wrap(lines, width, height, self.border_title)
|
||||
return frame.wrap(lines, width, height, self.border_title, stops)
|
||||
Reference in new issue
Block a user