Overlapping renders with transparency? #5300
Answered
by
willmcgugan
TomJGooding
asked this question in
Q&A
-
This might not be possible or I'm missing something obvious, but is there a way of overlapping widget renders with transparency? Here's a contrived example which hopefully demonstrates what I mean: from textual.app import App, ComposeResult, RenderResult
from textual.widget import Widget
class O_e_l_p_i_g(Widget):
def render(self) -> RenderResult:
return "O e l p i g"
class _v_r_a_p_n_(Widget):
def render(self) -> RenderResult:
return " v r a p n "
class OverlappingApp(App):
CSS = """
Widget {
height: auto;
position: absolute;
}
"""
def compose(self) -> ComposeResult:
yield _v_r_a_p_n_()
yield O_e_l_p_i_g()
if __name__ == "__main__":
app = OverlappingApp()
app.run() |
Beta Was this translation helpful? Give feedback.
Answered by
willmcgugan
Nov 27, 2024
Replies: 1 comment 3 replies
-
Not like that, no. The compositor treats each render as a solid strip. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
TomJGooding
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not like that, no. The compositor treats each render as a solid strip.