Skip to content

Commit e91416f

Browse files
committed
fix for colors view
1 parent 6d21b3d commit e91416f

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/textual_dev/previews/colors.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ColorsView {
1818
align: center middle;
1919
overflow-x: auto;
2020
background: $background;
21-
scrollbar-gutter: stable;
21+
scrollbar-gutter: stable;
2222
}
2323

2424
ColorItem {
@@ -57,6 +57,10 @@ ColorGroup.-active {
5757
border: wide $secondary;
5858
}
5959

60+
NamedColorsView {
61+
height: 1fr;
62+
}
63+
6064
.text {
6165
color: $text;
6266
}

src/textual_dev/previews/colors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ class ColorsApp(App[None]):
7979
def compose(self) -> ComposeResult:
8080
yield Footer()
8181
with ColorTabs("Theme Colors", "Named Colors"):
82-
yield Content(ThemeColorButtons())
83-
yield Vertical(NamedColorsView())
82+
yield Content(ThemeColorButtons(), id="theme")
83+
yield NamedColorsView()
8484

8585
def on_mount(self) -> None:
8686
self.call_after_refresh(self.update_view)
8787

8888
def update_view(self) -> None:
89-
content = self.query_one("Content", Content)
89+
content = self.query_one("#theme", Content)
9090
content.mount(ThemeColorsView())
9191

9292
def on_button_pressed(self, event: Button.Pressed) -> None:

0 commit comments

Comments
 (0)