prompt-toolkit / prompt-toolkit/python-prompt-toolkit
More minimal frame title?
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Frame formats like this:
┌─| Hello |─┐
│World │
└───────────┘
Is there a straightforward way to draw a frame without the padding round its title?
┌───Hello───┐
│World │
└───────────┘
Code for the above:
from prompt_toolkit.application import Application
from prompt_toolkit.layout import Layout, VSplit, Window
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.key_binding.bindings.named_commands import end_of_file
from prompt_toolkit.widgets import Frame, TextArea
kb = KeyBindings()
kb.add("c-c")(end_of_file)
frame = Frame(TextArea(text="World", width=11), title="Hello")
root_container = VSplit([frame, Window()])
layout = Layout(root_container)
app = Application(layout=layout, key_bindings=kb)
app.run()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided Python example and inspect the Frame entry point and its title rendering behavior. Determine how the title padding is produced and verify the result against the requested frame output, while preserving the existing padded format by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100