Replies: 1 comment
-
|
aah sorry my bad, forgot that i do binding in parent widget managed to solve this by changing widgets.Box(
vertical=True,
vexpand=True,
css_classes=["notification"],
spacing=16,
child=notification.bind(
"notifications",
lambda notifications: [
widgets.Box(
child=[
widgets.Label(
css_classes=["count"],
label=f"{len(notifications)} Notifikasi",
),
widgets.Button(
css_classes=["clear-all"],
hexpand=True,
halign="end",
on_click=lambda _: notification.clear_all(),
child=widgets.Label(
css_classes=["label"],
label="Hapus Semua",
),
),
]
),
widgets.Scroll(
vexpand=True,
child=NotificationList(),
),
],
),
),to this widgets.Box(
vertical=True,
vexpand=True,
css_classes=["notification"],
spacing=16,
child=[
widgets.Box(
child=[
widgets.Label(
css_classes=["count"],
label=notification.bind(
"notifications",
lambda notifications: f"{len(notifications)} Notifikasi",
),
),
widgets.Button(
css_classes=["clear-all"],
hexpand=True,
halign="end",
on_click=lambda _: notification.clear_all(),
child=widgets.Label(
css_classes=["label"],
label="Hapus Semua",
),
),
]
),
widgets.Scroll(
vexpand=True,
child=NotificationList(),
),
],
), |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i'm confused with

notifiedsignal. When i test it with simple code that print summary and body, it show multiple time instead of one time.i don't know if this related or not, i can't show the child too

here the code
Beta Was this translation helpful? Give feedback.
All reactions