use different constructor to more reliably set the parent for menus and actions
This may make rendering menus more stable on hi-dpi monitors. It worked before, but sometimes it had some weird glitches.
This commit is contained in:
@@ -67,7 +67,8 @@ class MainWindow(QMainWindow):
|
||||
]
|
||||
|
||||
for (menu_id, menu_label) in known_menus:
|
||||
menu = QMenu(menu_label, self)
|
||||
menu = QMenu(self)
|
||||
menu.setTitle(menu_label)
|
||||
mcs: [MenuContribution] = [mc for mc in menu_contributions if mc.menu_id == menu_id]
|
||||
if len(mcs) == 0:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user