image_view: Make space for always on scrollbars

Increase the margin of the overlay if scrollbars are set to always
visible.

Fixes #528
This commit is contained in:
Sophie Herold 2025-12-04 21:22:07 +01:00
parent 89b4e7a082
commit f2dbee5ef8
6 changed files with 34 additions and 19 deletions

View file

@ -20,6 +20,8 @@
//!
//! This widget also handles showing the context menu.
use std::time::Duration;
use adw::subclass::prelude::*;
use glib::{Properties, clone};
use gtk::CompositeTemplate;
@ -33,8 +35,6 @@ use crate::util::gettext::*;
use crate::widgets::LpImage;
mod imp {
use std::time::Duration;
use super::*;
#[derive(Debug, Default, CompositeTemplate, Properties)]
@ -85,15 +85,8 @@ mod imp {
}
}
#[glib::derived_properties]
impl ObjectImpl for LpImagePage {
fn properties() -> &'static [glib::ParamSpec] {
Self::derived_properties()
}
fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value {
self.derived_property(id, pspec)
}
fn constructed(&self) {
let obj = self.obj();