Updating selection list

This commit is contained in:
Darren Burns
2024-10-22 12:49:10 +01:00
parent 0779a804f9
commit d39de21e6c
4 changed files with 37 additions and 46 deletions

View File

@@ -130,7 +130,6 @@ class ChangingThemeApp(App[None]):
#palette {
height: auto;
grid-size: 3;
margin: 1 2;
border-bottom: solid $border;
}
#widget-list {

10
poetry.lock generated
View File

@@ -1919,19 +1919,19 @@ idna2008 = ["idna"]
[[package]]
name = "rich"
version = "13.8.0"
version = "13.9.2"
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
optional = false
python-versions = ">=3.7.0"
python-versions = ">=3.8.0"
files = [
{file = "rich-13.8.0-py3-none-any.whl", hash = "sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc"},
{file = "rich-13.8.0.tar.gz", hash = "sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4"},
{file = "rich-13.9.2-py3-none-any.whl", hash = "sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1"},
{file = "rich-13.9.2.tar.gz", hash = "sha256:51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c"},
]
[package.dependencies]
markdown-it-py = ">=2.2.0"
pygments = ">=2.13.0,<3.0.0"
typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.9\""}
typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.11\""}
[package.extras]
jupyter = ["ipywidgets (>=7.5.1,<9)"]

View File

@@ -124,6 +124,30 @@ BUILTIN_THEMES: dict[str, Theme] = {
"input-selection-background": "#689d6a80",
},
),
"catppuccin-mocha": Theme(
name="catppuccin-mocha",
primary="#F5C2E7",
secondary="#cba6f7",
warning="#FAE3B0",
error="#F28FAD",
success="#ABE9B3",
accent="#fab387",
foreground="#cdd6f4",
background="#181825",
surface="#313244",
panel="#45475a",
dark=True,
variables={
"input-cursor-foreground": "#11111b",
"input-cursor-background": "#f5e0dc",
"input-selection-background": "#9399b2 30%",
"border": "#b4befe",
"border-blurred": "#585b70",
"footer-background": "#45475a",
"block-cursor-foreground": "#1e1e2e",
"block-cursor-text-style": "none",
},
),
"solarized-dark": Theme(
name="solarized-dark",
primary="#268bd2",
@@ -198,30 +222,6 @@ BUILTIN_THEMES: dict[str, Theme] = {
panel="#414868", # Panel
dark=True,
),
"catppuccin-mocha": Theme(
name="catppuccin-mocha",
primary="#F5C2E7",
secondary="#b4befe",
warning="#FAE3B0",
error="#F28FAD",
success="#ABE9B3",
accent="#DDB6F2",
foreground="#cdd6f4",
background="#181825",
surface="#313244",
panel="#45475a",
dark=True,
variables={
"input-cursor-foreground": "#11111b",
"input-cursor-background": "#f5e0dc",
"input-selection-background": "#9399b2 30%",
"border": "#45475a",
"border-blurred": "#585b70",
"footer-background": "#45475a",
"footer-key-foreground": "#89b4fa",
"block-cursor-foreground": "#1e1e2e",
},
),
"monokai": Theme(
name="monokai",
primary="#F92672",

View File

@@ -98,27 +98,23 @@ class SelectionList(Generic[SelectionType], OptionList):
height: auto;
& > .selection-list--button {
text-style: bold;
color: $surface;
background: $foreground 15%;
background: $panel;
}
& > .selection-list--button-highlighted {
text-style: bold;
color: $surface;
background: $foreground 15%;
background: $panel;
}
& > .selection-list--button-selected {
text-style: bold;
color: $success;
background: $foreground 15%;
background: $panel;
}
& > .selection-list--button-selected-highlighted {
text-style: bold;
color: $success;
background: $foreground 15%;
background: $panel;
}
&:light {
@@ -138,25 +134,21 @@ class SelectionList(Generic[SelectionType], OptionList):
&:focus {
& > .selection-list--button {
text-style: bold;
background: $foreground 25%;
background: $panel-lighten-1;
}
& > .selection-list--button-highlighted {
text-style: bold;
background: $foreground 25%;
background: $panel-lighten-1;
}
& > .selection-list--button-selected {
text-style: bold;
color: $success;
background: $foreground 25%;
background: $panel-lighten-1;
}
& > .selection-list--button-selected-highlighted {
text-style: bold;
color: $success;
background: $foreground 25%;
background: $panel-lighten-1;
}
}