fix(notification_banner): adjustment of notification banner mouse event filter

This commit is contained in:
2026-06-05 15:27:02 +02:00
parent 9c96808234
commit 9047d69722
2 changed files with 6 additions and 0 deletions
@@ -908,6 +908,8 @@ class NotificationCentre(QScrollArea):
self.setFixedHeight(min(content_h, avail))
def eventFilter(self, watched, event):
if not isinstance(event, QtCore.QEvent):
return False
if watched is self.parent() and event.type() == QtCore.QEvent.Resize:
self._adjust_height()
return super().eventFilter(watched, event)
+4
View File
@@ -281,6 +281,10 @@ def test_centre_updates_from_qapp_theme_changed_signal(qtbot, centre):
assert LIGHT_PALETTE["title"] in toast._title_lbl.styleSheet()
def test_centre_event_filter_ignores_non_qevent(centre):
assert centre.eventFilter(centre.parent(), QtGui.QStandardItem()) is False
# ------------------------------------------------------------------------
# NotificationIndicator tests
# ------------------------------------------------------------------------