Previously we loaded images synchronously and manually changed `LpImage`. This could cause freezes when loading large images and SVGs. We also had no proper feedback for when a corrupted or unsupported image was loaded. This commit introduces a major rework to how we handle images and the gallery. It introduces a swipeable gallery that loads files asynchronously via a new widget: LpImagePage. LpImagePage owns the file and information related to the file, and on creation it spawns a future that either loads an error page when it can't load something (file deleted, corrupted, or unsupported) or the actual image via LpImage. LpImagePage now holds the right-click popover and the associated gestures. The gestures needed to be moved to LpImagePage in order to rework LpImageView's overlay - instead of having an overlay child that's a box with a few buttons, we now have the buttons as individual overlay children. This could cause them to overlap each other at certain sizes, but it's required in order to allow input to reach the carousel below. Right now this comes with a few regressions: * Occasionally input gets blocked across the applications. It's hard to tell if this is caused by swipes or right clicking. This input issue can cause a crash - no Rust backtrace, so a debugger is needed. * The "current" page doesn't seem to be properly loaded by the time `set_image_from_file ()` finishes, so we need to rework resizing from image dimensions * We need to re-implement loading different directories and files within directories There also seems to be an issue on touchscreens, swiping between images on a touchscreen causes responsiveness issues not present when swiping on a touchpad. My guess is that it's related to the long press gesture. |
||
|---|---|---|
| build-aux | ||
| data | ||
| help | ||
| po | ||
| src | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| COPYING.md | ||
| meson.build | ||
| meson_options.txt | ||
| README.md | ||
Loupe
A simple image viewer application written with GTK4 and Rust.
MVP TODO
- Hover timeout for buttons and fullscreen headerbar
- Pan/zoom
- Back/forward navigation
Building
GNOME Builder
GNOME Builder is the environment used for developing this application. It can use Flatpak manifests to create a consistent building and running environment cross-distro. Thus, it is highly recommended you use it.
- Download GNOME Builder.
- In Builder, click the "Clone Repository" button at the bottom, using
git@gitlab.gnome.org/BrainBlasted/loupe.gitorhttps://gitlab.gnome.org/BrainBlasted/loupe.gitas the URL. - Click the build button at the top once the project is loaded.
Installation
Depending on how you want it installed instructions can differ. If you used GNOME Builder to build it, clicking the bar at the top window will open a submenu with "Export Bundle". This will create a flatpak bundle, which can be installed on any system that supports flatpak.
In order for the Loupe flatpak to be able to read the directory images are installed in, you must install a bundle. Once you have a bundle installed, development builds will work properly.
Conduct
Loupe operates under the GNOME Code Of Conduct. See the full text of the Code Of Conduct here.