How to customize the border #8

Closed
opened 2022-07-11 08:49:26 +02:00 by gagbo · 1 comment

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 2022-07-11 10:52:15 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: akib/emacs-popon#8
No description provided.