window: Drop AdwFlap for Headerbar
Redo everything headerbar related with new Adw widgets when there is a working concept. Closes #112 Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/192>
This commit is contained in:
parent
dab333e510
commit
2dbc7fa585
3 changed files with 7 additions and 35 deletions
|
|
@ -68,8 +68,6 @@ mod imp {
|
|||
// TemplateChild<T> wrapper, where T is the
|
||||
// object type of the template child.
|
||||
#[template_child]
|
||||
pub(super) flap: TemplateChild<adw::Flap>,
|
||||
#[template_child]
|
||||
pub(super) headerbar: TemplateChild<gtk::HeaderBar>,
|
||||
#[template_child]
|
||||
pub(super) properties_button: TemplateChild<gtk::ToggleButton>,
|
||||
|
|
@ -783,18 +781,6 @@ impl LpWindow {
|
|||
}
|
||||
}
|
||||
|
||||
// We also have a closure that returns `adw::FlapFoldPolicy`.
|
||||
// if we aren't fullscreened, or if the properties are revealed,
|
||||
// we unfold the main flap. Otherwise we're always folded.
|
||||
#[template_callback]
|
||||
fn fold_policy(&self, fullscreened: bool, properties_revealed: bool) -> adw::FlapFoldPolicy {
|
||||
if !fullscreened || properties_revealed {
|
||||
adw::FlapFoldPolicy::Never
|
||||
} else {
|
||||
adw::FlapFoldPolicy::Always
|
||||
}
|
||||
}
|
||||
|
||||
#[template_callback]
|
||||
fn on_motion_cb(&self) {
|
||||
let controller = &self.imp().motion_controller;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue