diff --git a/src/widgets/image.rs b/src/widgets/image.rs index c547e19..3998cf0 100644 --- a/src/widgets/image.rs +++ b/src/widgets/image.rs @@ -79,65 +79,65 @@ mod imp { #[derive(Debug, Default)] pub struct LpImage { - pub file: RefCell>, - pub path: RefCell>, - pub is_deleted: Cell, + pub(super) file: RefCell>, + pub(super) path: RefCell>, + pub(super) is_deleted: Cell, /// Track changes to this image - pub file_monitor: RefCell>, - pub tiles: Arc>, - pub decoder: RefCell>>, - pub format: RefCell>, + pub(super) file_monitor: RefCell>, + pub(super) tiles: Arc>, + pub(super) decoder: RefCell>>, + pub(super) format: RefCell>, /// Set to true when image is ready for displaying - pub is_loaded: Cell, + pub(super) is_loaded: Cell, /// Set if an error has occurred, shown on error_page - pub error: RefCell>, + pub(super) error: RefCell>, /// Rotation final value (can differ from `rotation` during animation) - pub rotation_target: Cell, + pub(super) rotation_target: Cell, /// Rotated presentation of original image in degrees clockwise - pub rotation: Cell, + pub(super) rotation: Cell, // Animates the `rotation` property - pub rotation_animation: OnceCell, + pub(super) rotation_animation: OnceCell, /// Mirrored presentation of original image - pub mirrored: Cell, + pub(super) mirrored: Cell, /// Displayed zoom level - pub zoom: Cell, - pub zoom_animation: OnceCell, + pub(super) zoom: Cell, + pub(super) zoom_animation: OnceCell, /// Targeted zoom level, might differ from `zoom` when animation is running - pub zoom_target: Cell, + pub(super) zoom_target: Cell, /// Current animation is transitioning from having horizontal scrollbars /// to not having them or vice versa. - pub zoom_hscrollbar_transition: Cell, + pub(super) zoom_hscrollbar_transition: Cell, /// Same but for vertical - pub zoom_vscrollbar_transition: Cell, + pub(super) zoom_vscrollbar_transition: Cell, /// Always fit image into window, causes `zoom` to change automatically - pub best_fit: Cell, + pub(super) best_fit: Cell, /// Max zoom level is reached, stored to only send signals on change - pub max_zoom: Cell, + pub(super) max_zoom: Cell, /// Horizontal scrolling - pub hadjustment: RefCell>, + pub(super) hadjustment: RefCell>, /// Vertical scrolling - pub vadjustment: RefCell>, + pub(super) vadjustment: RefCell>, /// Currently EXIF data - pub image_metadata: RefCell, + pub(super) image_metadata: RefCell, /// Image dimension details for SVGs - pub dimension_details: RefCell, + pub(super) dimension_details: RefCell, /// Current pointer position - pub pointer_position: Cell>, + pub(super) pointer_position: Cell>, /// Position of fingers during zoom gesture /// /// Required for calculating delta when moving window on touchscreen. /// On touchpad this is only the initial value used as the zoom target. - pub zoom_gesture_center: Cell>, + pub(super) zoom_gesture_center: Cell>, /// Required for calculating delta while moving window around - pub last_drag_value: Cell>, + pub(super) last_drag_value: Cell>, widget_dimensions: Cell<(i32, i32)>, } diff --git a/src/widgets/image_view.rs b/src/widgets/image_view.rs index 1c9d73c..f652315 100644 --- a/src/widgets/image_view.rs +++ b/src/widgets/image_view.rs @@ -60,20 +60,20 @@ mod imp { pub struct LpImageView { /// Direct child of this Adw::Bin #[template_child] - pub bin_child: TemplateChild, + pub(super) bin_child: TemplateChild, /// overlayed controls #[template_child] - pub controls_box_start: TemplateChild, + pub(super) controls_box_start: TemplateChild, /// overlayed controls #[template_child] - pub controls_box_end: TemplateChild, + pub(super) controls_box_end: TemplateChild, #[template_child] pub sliding_view: TemplateChild, - pub model: RefCell, - pub preserve_content: Cell, + pub(super) model: RefCell, + pub(super) preserve_content: Cell, - pub current_image_signals: OnceCell, + pub(super) current_image_signals: OnceCell, } #[glib::object_subclass] diff --git a/src/widgets/properties_view.rs b/src/widgets/properties_view.rs index 8154176..e1aa6de 100644 --- a/src/widgets/properties_view.rs +++ b/src/widgets/properties_view.rs @@ -43,13 +43,13 @@ mod imp { #[derive(Debug, Default, CompositeTemplate)] #[template(file = "../../data/gtk/properties_view.ui")] pub struct LpPropertiesView { - pub file: RefCell>>, - pub image: RefCell>>, + pub(super) file: RefCell>>, + pub(super) image: RefCell>>, - pub metadata: RefCell, + pub(super) metadata: RefCell, - pub file_info: RefCell>, - pub info_handle: RefCell>, + pub(super) file_info: RefCell>, + pub(super) info_handle: RefCell>, } #[glib::object_subclass] diff --git a/src/window.rs b/src/window.rs index 22ad0df..6f2a9a5 100644 --- a/src/window.rs +++ b/src/window.rs @@ -56,25 +56,25 @@ mod imp { // TemplateChild wrapper, where T is the // object type of the template child. #[template_child] - pub flap: TemplateChild, + pub(super) flap: TemplateChild, #[template_child] - pub headerbar: TemplateChild, + pub(super) headerbar: TemplateChild, #[template_child] - pub properties_button: TemplateChild, + pub(super) properties_button: TemplateChild, #[template_child] - pub menu_button: TemplateChild, + pub(super) menu_button: TemplateChild, #[template_child] - pub toast_overlay: TemplateChild, + pub(super) toast_overlay: TemplateChild, #[template_child] - pub stack: TemplateChild, + pub(super) stack: TemplateChild, #[template_child] - pub status_page: TemplateChild, + pub(super) status_page: TemplateChild, #[template_child] - pub image_view: TemplateChild, + pub(super) image_view: TemplateChild, #[template_child] - pub properties_view: TemplateChild, + pub(super) properties_view: TemplateChild, #[template_child] - pub drop_target: TemplateChild, + pub(super) drop_target: TemplateChild, } #[glib::object_subclass]