Implement structure to open modal when clicking on media item

This commit is contained in:
Reinout Meliesie 2025-02-12 14:11:53 +01:00
commit be92920cc5
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
4 changed files with 101 additions and 82 deletions

View file

@ -187,13 +187,13 @@ macro_rules ! bin { ( $ ( @ vexpand : $ vexpand : expr ; ) ? ) => { {
macro_rules ! application_window { (
@ application : $ application : expr ;
@ title : $ title : expr ;
$ content : expr $ (,) ?
$ ( $ content : expr $ (,) ? ) ?
) => { {
use libadwaita :: prelude :: * ;
let window = libadwaita :: ApplicationWindow :: new ( $ application ) ;
window . set_title ( Some ( $ title ) ) ;
window . set_content ( Some ( $ content ) ) ;
$ ( window . set_content ( Some ( $ content ) ) ; ) ?
window
} } }
@ -207,6 +207,11 @@ macro_rules ! toolbar_view { (
widget
} } }
macro_rules ! dialog { () => { {
let widget = libadwaita :: Dialog :: new () ;
widget
} } }
macro_rules ! vertically_filling { ( $ child : expr ) => {
g_box ! (
@ orientation : gtk4 :: Orientation :: Vertical ;
@ -247,6 +252,7 @@ pub (crate) use {
bin ,
application_window ,
toolbar_view ,
dialog ,
vertically_filling ,
pango_attributes ,
} ;