Collection items are now clickable

This commit is contained in:
Reinout Meliesie 2025-02-07 16:22:34 +01:00
commit c3dfa5b459
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
3 changed files with 45 additions and 22 deletions

View file

@ -90,6 +90,18 @@ macro_rules ! list_box { (
container
} } }
macro_rules ! button { (
$ ( @ css_classes : $ css_classes : expr ; ) ?
$ ( @ connect_clicked : $ connect_clicked : expr ; ) ?
$ ( $ child : expr ) ? $ (,) ?
) => { {
let button = gtk4 :: Button :: new () ;
$ ( button . set_css_classes ( $ css_classes ) ; ) ?
$ ( button . connect_clicked ( $ connect_clicked ) ; ) ?
$ ( button . set_child ( Some ( $ child ) ) ; ) ?
button
} } }
macro_rules ! split_button { (
$ ( @ popover : $ popover : expr ; ) ?
$ child : expr $ (,) ?
@ -214,6 +226,7 @@ pub (crate) use {
g_box ,
view_stack ,
list_box ,
button ,
split_button ,
popover ,
image ,