How to customize the border #8

Closed
opened 3 months ago by gagbo · 1 comments
gagbo commented 3 months ago

Hello,

I've been looking into those packages recently, and I have a small itch I'm trying to scratch but struggle to. Is it possible to customize the border of the popup ? I'd like to be able to make the separation between the floating, virtual text and the content of the buffer.

I suppose it's going to be impossible in TUI (where I think I'll tweak the background instead), but I'd like to have the ability to do so at least in GUI.

Or is it the downstream packages like emacs-popon and corfu-terminal that are supposed to deal with it ?

Regards,
Gerry

Hello, I've been looking into those packages recently, and I have a small itch I'm trying to scratch but struggle to. Is it possible to customize the border of the popup ? I'd like to be able to make the separation between the floating, virtual text and the content of the buffer. I suppose it's going to be impossible in TUI (where I think I'll tweak the background instead), but I'd like to have the ability to do so at least in GUI. Or is it the downstream packages like `emacs-popon` and `corfu-terminal` that are supposed to deal with it ? Regards, Gerry
Owner

Well, Popon is very minimal, and it only shows text, without any modification. It seems that you want to show a thin single pixel border outside the popon. But it's not possible. Popon doesn't use child frame, it uses overlays. However, you can do the trick with text properties on GUI, but it will (AFAIK) increase the line spacing. Instead, to show a border, you can make the border a part of the text using ASCII art. For example, if you would like to show "Hello, World", you have to pass "+-------------+\n|Hello, World!|\n+-------------+" to popon-create. Then it would create an illusion of border, while working on both GUI and TUI.

Well, Popon is very minimal, and it only shows text, without any modification. It seems that you want to show a thin single pixel border outside the popon. But it's not possible. Popon doesn't use child frame, it uses overlays. However, you can do the trick with text properties on GUI, but it will (AFAIK) increase the line spacing. Instead, to show a border, you can make the border a part of the text using ASCII art. For example, if you would like to show `"Hello, World"`, you have to pass `"+-------------+\n|Hello, World!|\n+-------------+"` to `popon-create`. Then it would create an illusion of border, while working on both GUI and TUI.
akib added the
Kind: Documentation
label 3 months ago
akib closed this issue 3 months ago
Sign in to join this conversation.
Loading…
There is no content yet.