window: bind properties in UI file

This is possible, and allows us to clean up constructed
a bit.
This commit is contained in:
Christopher Davis 2021-01-23 23:46:33 -08:00
parent f49ef9b2d9
commit f621fedbba
2 changed files with 2 additions and 13 deletions

View file

@ -114,19 +114,6 @@ mod imp {
.connect_released(clone!(@weak obj => move |_, _, _, _| {
obj.pick_file();
}));
obj.bind_property("fullscreened", &*self.image_view, "header-visible")
.flags(glib::BindingFlags::SYNC_CREATE | glib::BindingFlags::BIDIRECTIONAL)
.build()
.unwrap();
obj.bind_property("fullscreened", &*self.headerbar, "visible")
.flags(
glib::BindingFlags::SYNC_CREATE
| glib::BindingFlags::BIDIRECTIONAL
| glib::BindingFlags::INVERT_BOOLEAN,
)
.build()
.unwrap();
}
}