window: Bind headerbar opacity to controls
No purpose yet, but will help when we want to implement fading. Need to have support for closures in Rust first.
This commit is contained in:
parent
e45b89f854
commit
293dc3c124
3 changed files with 16 additions and 1 deletions
|
|
@ -44,6 +44,8 @@ mod imp {
|
|||
#[template_child]
|
||||
pub picture: TemplateChild<gtk::Picture>,
|
||||
#[template_child]
|
||||
pub controls: TemplateChild<gtk::Box>,
|
||||
#[template_child]
|
||||
pub popover: TemplateChild<gtk::PopoverMenu>,
|
||||
#[template_child]
|
||||
pub click_gesture: TemplateChild<gtk::GestureClick>,
|
||||
|
|
@ -103,6 +105,13 @@ mod imp {
|
|||
None,
|
||||
glib::ParamFlags::READABLE,
|
||||
),
|
||||
glib::ParamSpec::new_object(
|
||||
"controls",
|
||||
"Controls",
|
||||
"The controls for the image view",
|
||||
gtk::Box::static_type(),
|
||||
glib::ParamFlags::READABLE,
|
||||
),
|
||||
]
|
||||
});
|
||||
|
||||
|
|
@ -133,6 +142,7 @@ mod imp {
|
|||
match psec.name() {
|
||||
"popover-menu-model" => self.popover_menu_model.borrow().to_value(),
|
||||
"filename" => self.filename.borrow().to_value(),
|
||||
"controls" => self.controls.to_value(),
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue