1
0
Fork 0

Adding upstream version 4.0.4.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-04 22:09:41 +02:00
parent 1f832614e9
commit 0832c185c0
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
48 changed files with 7595 additions and 0 deletions

View file

@ -0,0 +1,39 @@
from textual.app import App, ComposeResult
from textual.content import Content
from textual.widgets import Input
from textual_autocomplete import AutoComplete, DropdownItem
LANGUAGES = [
DropdownItem(
"Python",
prefix=Content.from_markup("[$text-success on $success-muted] 🐍 "),
),
DropdownItem(
"Golang",
prefix=Content.from_markup("[$text-primary on $primary-muted] 🔷 "),
),
DropdownItem("Java", prefix=Content.from_markup("[#6a2db5 on magenta 20%] ☕ ")),
DropdownItem(
"Rust", prefix=Content.from_markup("[$text-accent on $accent-muted] 🦀 ")
),
]
class LanguagesSearchApp(App[None]):
CSS = """
Input {
margin: 2 4;
}
"""
def compose(self) -> ComposeResult:
input_widget = Input(placeholder="Search for a programming language...")
yield input_widget
yield AutoComplete(target=input_widget, candidates=LANGUAGES)
if __name__ == "__main__":
app = LanguagesSearchApp()
app.run()