feat: restructure overlay and video widget integration for improved rendering
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user