v0.03: fix hamburger menu clipping off right edge of screen
Change menu anchor from bottomLeft() to bottomRight() so Qt's built-in overflow logic flips the menu leftward when the button is near the right screen edge. All bookmarks now visible.
This commit is contained in:
+3
-2
@@ -418,9 +418,10 @@ class KioskOverlay(QWidget):
|
|||||||
mgr_act = QAction(" ⚙ Manage Bookmarks…", menu)
|
mgr_act = QAction(" ⚙ Manage Bookmarks…", menu)
|
||||||
mgr_act.triggered.connect(self.open_manager)
|
mgr_act.triggered.connect(self.open_manager)
|
||||||
menu.addAction(mgr_act)
|
menu.addAction(mgr_act)
|
||||||
# Show menu below the hamburger button
|
# Show menu below the hamburger button, anchored to right edge so
|
||||||
|
# Qt's overflow logic flips it leftward (avoids clipping off-screen).
|
||||||
menu.exec_(self.burger_btn.mapToGlobal(
|
menu.exec_(self.burger_btn.mapToGlobal(
|
||||||
self.burger_btn.rect().bottomLeft()))
|
self.burger_btn.rect().bottomRight()))
|
||||||
|
|
||||||
def _build_menu(self, items):
|
def _build_menu(self, items):
|
||||||
menu = QMenu()
|
menu = QMenu()
|
||||||
|
|||||||
Reference in New Issue
Block a user