Skip to main content

Module lightbox

Module lightbox 

Source
Expand description

Lightbox image viewer: full-screen preview with zoom, pan, EXIF details, and keyboard navigation.

Loads preview or original resolution images with pinch-zoom and swipe navigation. Displays an EXIF metadata panel and provides download-to-folder and delete-to-trash actions.

StructsΒ§

ActionBar πŸ”’
Zoom controls, resolution toggle, and download button under the picture.
AssetInfo πŸ”’
Grid item properties the lightbox renders.
DetailsPane πŸ”’
Sidebar with the filename, sync summary, and EXIF groups.
Lightbox πŸ”’
Lightbox page widgets plus the state shared by its signal handlers. Handlers hold strong Rcs, so it lives as long as the page’s widgets.
LightboxHeader πŸ”’
Navigation page with its header bar (back, prev/next, details toggle).
LocalProbe πŸ”’
Everything we can learn about a local file off the main thread before handing the data back to GTK. exif is the cached EXIF parse; dims comes from a pixbuf header-only read; mtime_iso falls back when the file has no DateTimeOriginal so we always show some date.
PictureArea πŸ”’
Two pictures in a sliding stack, their scroller, and the overlay holding the spinner.
PictureLoad πŸ”’
One request to load an asset into the inactive picture.
UnavailableCard πŸ”’
β€œPreview unavailable” card shown over the picture when nothing can be decoded.

EnumsΒ§

LoadResult πŸ”’
What a finished load shows; applied only if the user is still on that asset.

FunctionsΒ§

accent_row πŸ”’
apply_lightbox_zoom πŸ”’
Apply zoom to a lightbox Picture. Zoom is fit-relative: 1.0 = the size the texture would occupy inside viewer under Contain layout. >1.0 overflows the viewer for panning. Returns the computed content dimensions when zoomed.
build_action_bar πŸ”’
build_camera_group πŸ”’
build_details_pane πŸ”’
build_header πŸ”’
build_image_group πŸ”’
build_location_group πŸ”’
build_picture_area πŸ”’
build_split_view πŸ”’
Picture viewer with the details pane as a sidebar that follows the window’s narrow layout.
build_unavailable_card πŸ”’
build_video_badge πŸ”’
build_viewer πŸ”’
build_zoom_group πŸ”’
crossfade_overlay πŸ”’
details_scroller πŸ”’
details_text_label πŸ”’
drag_export_path πŸ”’
Hard-link or copy a cached file under its original name so drag-out targets see that name. Returns source if the copy fails, and None when there is no cache directory.
exif_from_local πŸ”’
Convert local EXIF into the API shape so one renderer handles both sources.
fill_exif_box πŸ”’
Populate the details sidebar with sectioned EXIF metadata.
format_bytes πŸ”’
Format a byte count value into a human-readable size string (e.g. KB, MB, GB).
format_camera πŸ”’
format_datetime_display πŸ”’
Format an ISO 8601 timestamp for display, converting from UTC to the user’s local timezone.
format_exposure πŸ”’
format_location πŸ”’
icon_button πŸ”’
lightbox_picture πŸ”’
lightbox_title_cap πŸ”’
Title length that still fits in the header beside the nav buttons.
local_details_exif πŸ”’
EXIF for the details pane with gaps filled from the filesystem; None if nothing is known.
open_lightbox πŸ”’
Construct and present the fullscreen lightbox view for a selected asset.
original_preview_cache_path πŸ”’
Cache path for a downloaded original; keeps the extension so decoders pick the right format.
probe_local_file πŸ”’
Metadata, pixel size, and cached EXIF for a local file; does blocking I/O.
systemtime_to_rfc3339 πŸ”’
Local-timezone RFC3339, so format_datetime_display treats it like an EXIF timestamp.
truncate_filename πŸ”’
Truncate a filename to a maximum character limit, appending an ellipsis if needed.