[GH-ISSUE #519] Modal border background color no longer matches modal's background color #376

Closed
opened 2026-03-04 01:04:28 +03:00 by kerem · 8 comments
Owner

Originally created by @polothy on GitHub (Nov 2, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/519

The modal border background color used to match the background color of the modal itself. Now it appears that the border background color is the default background color.

I think this change introduced the new behavior: github.com/rivo/tview@d551c850a7/box.go (L73)

On the modal, the border is set on the frame which is private, so cannot workaround it by just updating the border style:

github.com/rivo/tview@d551c850a7/modal.go (L49-L51)

This PR could help to provide a way to implement a workaround: https://github.com/rivo/tview/pull/458 - but that's just an FYI. I of course do not mind how it is fixed or if it is actually implemented as intended and this is not a bug.

Since I'm making an issue, I'll take the opportunity to thank you for the amazing project! Been having a lot of fun using it 😄

Originally created by @polothy on GitHub (Nov 2, 2020). Original GitHub issue: https://github.com/rivo/tview/issues/519 The modal border background color used to match the background color of the modal itself. Now it appears that the border background color is the default background color. I think this change introduced the new behavior: https://github.com/rivo/tview/blob/d551c850a7435cbb7829ce6703fd470c664801f3/box.go#L73 On the modal, the border is set on the `frame` which is private, so cannot workaround it by just updating the border style: https://github.com/rivo/tview/blob/d551c850a7435cbb7829ce6703fd470c664801f3/modal.go#L49-L51 This PR could help to provide a way to implement a workaround: https://github.com/rivo/tview/pull/458 - but that's just an FYI. I of course do not mind how it is fixed or if it is actually implemented as intended and this is not a bug. Since I'm making an issue, I'll take the opportunity to thank you for the amazing project! Been having a lot of fun using it 😄
kerem closed this issue 2026-03-04 01:04:28 +03:00
Author
Owner

@mevdschee commented on GitHub (Nov 4, 2020):

I have also seen this happen and I would appreciate a fix.

<!-- gh-comment-id:721522187 --> @mevdschee commented on GitHub (Nov 4, 2020): I have also seen this happen and I would appreciate a fix.
Author
Owner

@polothy commented on GitHub (Nov 4, 2020):

presentation_demo

You can see an example of the coloring in the presentation demo on the Flex and Grid demo pages.

<!-- gh-comment-id:721852668 --> @polothy commented on GitHub (Nov 4, 2020): ![presentation_demo](https://user-images.githubusercontent.com/634657/98141788-e3683480-1e7b-11eb-94c7-29bcdb7ad026.png) You can see an example of the coloring in the presentation demo on the Flex and Grid demo pages.
Author
Owner

@mevdschee commented on GitHub (Nov 4, 2020):

@polothy Thank you, I see exactly the same. And @rivo thank you for creating this wonderful library. I really like building stuff with it!

<!-- gh-comment-id:721892404 --> @mevdschee commented on GitHub (Nov 4, 2020): @polothy Thank you, I see exactly the same. And @rivo thank you for creating this wonderful library. I really like building stuff with it!
Author
Owner

@rivo commented on GitHub (Mar 12, 2021):

The latest commit should fix this. Could you please give me feedback whether it works for you now?

(Sorry for the delay, btw.)

<!-- gh-comment-id:797447751 --> @rivo commented on GitHub (Mar 12, 2021): The latest commit should fix this. Could you please give me feedback whether it works for you now? (Sorry for the delay, btw.)
Author
Owner

@mevdschee commented on GitHub (Mar 12, 2021):

image

Works on my machine! Latest on the left, older rev on the right (note the default dark-blue background behind the border).

Thank you.

Please keep up the good work on this fantastic library!

<!-- gh-comment-id:797612097 --> @mevdschee commented on GitHub (Mar 12, 2021): ![image](https://user-images.githubusercontent.com/1288217/110970899-7f3e0b80-835a-11eb-9c16-f4a59fe3fc8a.png) Works on my machine! Latest on the left, older rev on the right (note the default dark-blue background behind the border). Thank you. Please keep up the good work on this fantastic library!
Author
Owner

@rivo commented on GitHub (Mar 12, 2021):

More fixes. (Please refer to https://github.com/rivo/tview/issues/520#issuecomment-797659408.) Does it work for you with the latest update?

<!-- gh-comment-id:797667879 --> @rivo commented on GitHub (Mar 12, 2021): More fixes. (Please refer to https://github.com/rivo/tview/issues/520#issuecomment-797659408.) Does it work for you with the latest update?
Author
Owner

@mevdschee commented on GitHub (Mar 12, 2021):

Does it work for you with the latest update?

I tried the "Hello world again" code (from ticket 520) and it failed previously, but works fine for me when upgraded from:

github.com/rivo/tview v0.0.0-20201018122409-d551c850a743 => v0.0.0-20210312174852-ae9464cc3598

I hope this of use to you. Kind regards, Maurits

NB: I was able to reproduce the problem clearly by setting the default terminal background color to red (xfce4-terminal).

<!-- gh-comment-id:797680773 --> @mevdschee commented on GitHub (Mar 12, 2021): >Does it work for you with the latest update? I tried the "Hello world again" code (from ticket 520) and it failed previously, but works fine for me when upgraded from: github.com/rivo/tview v0.0.0-20201018122409-d551c850a743 => v0.0.0-20210312174852-ae9464cc3598 I hope this of use to you. Kind regards, Maurits NB: I was able to reproduce the problem clearly by setting the default terminal background color to red (xfce4-terminal).
Author
Owner

@rivo commented on GitHub (Mar 12, 2021):

Great! Thanks!

<!-- gh-comment-id:797731220 --> @rivo commented on GitHub (Mar 12, 2021): Great! Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
starred/tview#376
No description provided.