SideFX Houdini customization package
git clone https://git.lucas.co/hou-control.git
statusbar: open the circle's menu upward
Co-Authored-By: Claude Fable 5.1 <[email protected]>
python3.13libs/hc/hcstatusbar.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/python3.13libs/hc/hcstatusbar.py b/python3.13libs/hc/hcstatusbar.py
index 7d0c335..136b319 100644
--- a/python3.13libs/hc/hcstatusbar.py
+++ b/python3.13libs/hc/hcstatusbar.py
@@ -185,7 +185,11 @@ class StatusCircle(QWidget):
# Held on the widget so it outlives this handler; not parented,
# since setParent would drop the popup window flags.
self._menu = buildMainMenu()
- self._menu.popup(self.mapToGlobal(QPoint(0, 0)))
+ # Open upward: bottom-left of the menu on the circle's top-left.
+ # popup() still keeps it on screen if that would not fit.
+ top_left = self.mapToGlobal(QPoint(0, 0))
+ top_left.setY(top_left.y() - self._menu.sizeHint().height())
+ self._menu.popup(top_left)
event.accept()
return
super().mousePressEvent(event)