slidingView: Allocate LpImage more correctly
Allocate the ScrolledWindow instead of the LpImage to include non-overlayed scrollbars. General cleanup how we measure things. Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/150>
This commit is contained in:
parent
e5fc4bc85c
commit
7b7ece1dc3
3 changed files with 18 additions and 25 deletions
|
|
@ -48,6 +48,8 @@ mod imp {
|
|||
#[template_child]
|
||||
pub(super) image_stack_page: TemplateChild<gtk::Widget>,
|
||||
#[template_child]
|
||||
pub(super) scrolled_window: TemplateChild<gtk::ScrolledWindow>,
|
||||
#[template_child]
|
||||
pub(super) image: TemplateChild<LpImage>,
|
||||
#[template_child]
|
||||
pub(super) popover: TemplateChild<gtk::PopoverMenu>,
|
||||
|
|
@ -165,6 +167,10 @@ impl LpImagePage {
|
|||
self.image().path().unwrap()
|
||||
}
|
||||
|
||||
pub fn scrolled_window(&self) -> gtk::ScrolledWindow {
|
||||
self.imp().scrolled_window.clone()
|
||||
}
|
||||
|
||||
pub fn image(&self) -> LpImage {
|
||||
self.imp().image.get()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue