imagePage: Move popover out of LpImage

It cause 'not measured' errors and we have enough
things to handle in LpImage already.

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/146>
This commit is contained in:
Sophie Herold 2023-03-18 01:22:30 +01:00 • committed by Christopher Davis
parent f33c4bd470
commit 0e24f347e6
3 changed files with 44 additions and 44 deletions

View file

@ -56,6 +56,8 @@
<property name="description" bind-source="image" bind-property="error"/>
</object>
</child>
<child>
<object class="GtkBox" id="image_stack_page">
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="propagate-natural-height">True</property>
@ -72,6 +74,10 @@
<property name="touch-only">True</property>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkPopoverMenu" id="popover">
<property name="has-arrow">False</property>
@ -101,8 +107,6 @@
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</property>

View file

@ -269,10 +269,6 @@ mod imp {
.set_target(&adw::CallbackAnimationTarget::new(|_| {}));
obj.zoom_animation()
.set_target(&adw::CallbackAnimationTarget::new(|_| {}));
while let Some(child) = obj.first_child() {
child.unparent();
}
}
}

View file

@ -46,7 +46,7 @@ mod imp {
#[template_child]
pub(super) error_page: TemplateChild<adw::StatusPage>,
#[template_child]
pub(super) scrolled_window: TemplateChild<gtk::ScrolledWindow>,
pub(super) image_stack_page: TemplateChild<gtk::Widget>,
#[template_child]
pub(super) image: TemplateChild<LpImage>,
#[template_child]
@ -115,7 +115,7 @@ mod imp {
if obj.image().is_loaded() {
obj.imp()
.stack
.set_visible_child(&*obj.imp().scrolled_window);
.set_visible_child(&*obj.imp().image_stack_page);
}
}),
);