feat: restructure overlay and video widget integration for improved rendering

This commit is contained in:
2026-05-12 20:06:37 +02:00
parent 03d3332b35
commit ece4e1cd6e
2 changed files with 35 additions and 12 deletions

View File

@@ -31,11 +31,12 @@ class OverlayWidget(QWidget):
def __init__(self, parent: QWidget | None = None) -> None:
super().__init__(parent)
# Make widget transparent to mouse and visual background
# Child widget — NO window flags (FramelessWindowHint would detach it
# from the parent and create an invisible top-level window).
# WA_TranslucentBackground on a child only works when the parent is
# also translucent, so we paint the background ourselves in paintEvent.
self.setAttribute(Qt.WidgetAttribute.WA_TransparentForMouseEvents, True)
self.setAttribute(Qt.WidgetAttribute.WA_NoSystemBackground, True)
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground, True)
self.setWindowFlags(Qt.WindowType.FramelessWindowHint)
self._snapshot: TelemetrySnapshot | None = None
self._visible_overlay: bool = True