mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Command palette changes
This commit is contained in:
@@ -6,7 +6,7 @@ from typing import Any
|
||||
from textual._on import on
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.binding import Binding
|
||||
from textual.containers import Horizontal, Vertical, VerticalScroll
|
||||
from textual.containers import Grid, Horizontal, VerticalScroll
|
||||
from textual.widgets import (
|
||||
Button,
|
||||
Collapsible,
|
||||
@@ -129,7 +129,9 @@ class ChangingThemeApp(App[None]):
|
||||
|
||||
#palette {
|
||||
height: auto;
|
||||
grid-size: 3;
|
||||
margin: 1 2;
|
||||
border-bottom: solid $border;
|
||||
}
|
||||
#widget-list {
|
||||
& > OptionList {
|
||||
@@ -219,7 +221,7 @@ class ChangingThemeApp(App[None]):
|
||||
print(theme_name)
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
with Vertical(id="palette"):
|
||||
with Grid(id="palette"):
|
||||
theme = self.get_theme(self.theme)
|
||||
for variable, value in vars(theme).items():
|
||||
if variable not in {
|
||||
|
||||
@@ -469,7 +469,9 @@ class CommandList(OptionList, can_focus=False):
|
||||
}
|
||||
|
||||
CommandList > .option-list--option-highlighted {
|
||||
background: $primary;
|
||||
color: $block-cursor-foreground;
|
||||
background: $block-cursor-background;
|
||||
text-style: $block-cursor-text-style;
|
||||
}
|
||||
|
||||
CommandList:nocolor > .option-list--option-highlighted {
|
||||
@@ -543,6 +545,7 @@ class CommandPalette(SystemModalScreen[None]):
|
||||
min-height: 20;
|
||||
}
|
||||
CommandPalette {
|
||||
color: $foreground;
|
||||
background: $background 60%;
|
||||
align-horizontal: center;
|
||||
|
||||
@@ -562,7 +565,8 @@ class CommandPalette(SystemModalScreen[None]):
|
||||
}
|
||||
|
||||
CommandPalette > .command-palette--help-text {
|
||||
text-style: dim not bold;
|
||||
color: $foreground;
|
||||
text-style: not bold;
|
||||
}
|
||||
|
||||
CommandPalette:dark > .command-palette--highlight {
|
||||
|
||||
Reference in New Issue
Block a user