Implement structure to open modal when clicking on media item
This commit is contained in:
parent
2ec2fda116
commit
be92920cc5
4 changed files with 101 additions and 82 deletions
|
|
@ -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 ,
|
||||
} ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue