mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-06-05 21:08:40 +02:00
fix(notification_banner): adjustment of notification banner mouse event filter
This commit is contained in:
+2
@@ -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)
|
||||
|
||||
@@ -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
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user