Commit graph

58 commits

Author SHA1 Message Date
Sophie Herold
ca795c5b43 Prepare 45.0 release 2023-09-14 12:26:04 +00:00
Sophie Herold
0dd1cff88f cargo: Update dependencies 2023-09-03 18:33:08 +02:00
Sophie Herold
17edb52975 cargo: Update dependencies 2023-08-23 17:06:09 +00:00
Sophie Herold
6e3cd2c794 cargo: Update dependencies
Closes #230
2023-08-17 00:16:03 +02:00
Sophie Herold
05868d785f window: Always ask for program to open images
This fixes "Open With…" not always asking for a program.
2023-08-16 12:03:46 +02:00
Sophie Herold
17bdd38016 cargo: Update dependencies 2023-08-12 18:52:24 +02:00
Sophie Herold
8cea5a4252 cargo: Update dependencies 2023-08-11 14:03:24 +02:00
Sophie Herold
a027513447 decoder: Use glycin for decoding SVGs as well
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/267>
2023-08-06 11:59:33 +00:00
Sophie Herold
0cff205c9d general: Update to gtk-rs 0.7 2023-08-06 11:24:01 +02:00
Sophie Herold
aac476134f print: Use inch for US and LR
Closes #143

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/240>
2023-08-06 02:28:54 +00:00
Sophie Herold
6fe77fa6e5 flatpak: Use newer glycin version to test JXL
Closes #90

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/260>
2023-07-29 14:26:24 +00:00
Sophie Herold
6297dcf54b cargo: Update dependencies 2023-07-06 20:08:12 +02:00
Christopher Davis
439286be40 general: Use std's OnceCell where possible
Rust's standard library now provides a drop-in replacement
for `OnceCell`. It requires no API changes from `once_cell`'s
version.

This commit replaces the version from `once_cell` with the
new `std` struct where possible. We still need to use
`once_cell` for properties until
https://github.com/gtk-rs/gtk-rs-core/pull/1113
is merged. We also still need it for Lazy until that lands.

Part-of: <https://gitlab.gnome.org/GNOME/Incubator/loupe/-/merge_requests/241>
2023-06-23 18:59:09 +00:00
Sophie Herold
1b2dde79b6 decoder: Use glycin for image loading expect SVG
This gives us sandboxed image decoding and others the
option to extend Loupe with other image formats.
2023-06-07 20:21:28 +00:00
Sophie Herold
a8693c50ef fullscreen: Hide headerbar on idle
Closes #154
2023-05-03 22:21:18 +02:00
Sophie Herold
382370e325 cargo: Update dependencies
Use librsvg main for now to give the refactor some testing.

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/204>
2023-05-03 16:22:27 +00:00
Sophie Herold
ae5ca76176 printing: Add printing support
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/165>
2023-04-18 23:52:53 +00:00
Sophie Herold
e710419a22 decoder: Add basic color profile support
This only covers 8bit RGB(A) JPEG, PNG, and HEIF.
Should only be a temporary solution until GTK supports
color profiles.

Closes #36

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/172>
2023-04-18 21:22:09 +02:00
Sophie Herold
032707a210 fileModel: Use GFile with URI as key
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/174>
2023-04-18 16:22:49 +00:00
Sophie Herold
183411bfe3 cargo: Update dependencies 2023-04-12 20:18:28 +02:00
Sophie Herold
8b3cfd000a cargo: Remove gtk-macros dependency
Using the crate is depreacted. Replaced spawn! macro
with our own spawn function
2023-04-06 21:08:33 +00:00
Sophie Herold
114c292225 cargo: Update dependencies
And fix a meson warning
2023-04-04 23:20:42 +02:00
Sophie Herold
7bcc5e210b cargo: Update and cleanup dependencies
- Replace one remaining use of util::spawn with gio
- Replace pretty_env_logger with env_logger

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/149>
2023-03-25 14:01:28 +00:00
Sophie Herold
42d558d22f propertiesView: Use image dimensions from decoder
This also shows the units for SVG dimensions if not pixels.

Issue #43

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/136>
2023-03-14 02:31:07 +00:00
Sophie Herold
ddf4b8c2fa decoder: Load HEIC/x265 as plugin
Closes #85

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/123>
2023-03-13 23:12:07 +00:00
Sophie Herold
88efb9e5fd cargo: Update dependencies get rid of ignored CVE 2023-03-08 01:08:52 +01:00
Christopher Davis
42f044c3c6 cargo: Update libgweather dep 2023-03-05 11:16:35 -05:00
Sophie Herold
f80ec7db56 decoder: Use image-rs, libheif-rs, librsvg
This adds proper support for a lot of image formats including SVGs.
It will be the basis for many features to come. The technical core
is an asynchronous renderer that can arrange textures in smaller tiles
which might be generated on demand.

Closes #34, #40, #41, #49

Basis for fixing the following issues #7, #27, #36, #43, #68, #71
2023-03-04 21:48:51 -05:00
Sophie Herold
004ebd5615 cargo: Update dependencies 2023-02-15 17:04:59 +01:00
Sophie Herold
526ccbaec6 ci: Add cargo deny checks 2023-02-12 19:33:06 +01:00
Sophie Herold
d533124daa slidingView: Implement swipe gesture (AdwSwipeable) 2023-01-31 01:08:56 +00:00
Sophie Herold
f2357513da imageView: Use custom slide widget and IndexSet
Use IndexSet to allow direct access by Path and also allow
an arbitrary ordering that was not possible with Vec. Also
add monitoring of file changes in the directory.

Use a custom LpSlidingView instead of AdwCarousel because
Carousel was never designed for this job and suffered of
bugs. LpSlidingView does not support swiping gestures yet
since they currently don't work yet anyways #24.

Use a new algorithm to fill the LpSlidingView that is
stateless and covers all potential changes in the directory.
This not only fixes bugs but would also work with changed
sorting orders.

This also adds build time template XML validation since it
was useful for the refactoring #46.

Closes #9, #11, #30, #33, #42
2023-01-30 01:08:57 +00:00
Christopher Davis
2757e94e08 window: Update use of FileDialog.open_future()
Requires an updated gtk-rs
2023-01-14 14:23:54 -05:00
Christopher Davis
ba77ee1a32 window: Use new async FileDialog API
GTK 4.10 deprecates the old GtkFileChooser* APIs in favor of a
new GtkFileDialog utility. This new utility uses async functions
instead of a `response` signal, so we can make use of Rust's
async/await patterns.
2022-12-12 17:52:06 +00:00
Sophie Herold
65808f5894 propertiesView: Show basic EXIF data
Use libgweather to determine the city for EXIF GPS coordinates.
Make ImageMetadata a GObject to use it's properties in UI.
2022-12-12 11:31:27 -05:00
Sophie Herold
e04992b46d window: Adjust to image size when opening
Give LpImage a native with that should feel nice.
When opening a new window with a new image the window size
is determined by LpImage's natural width.
The image size and EXIF data is loaded before the image such
that the window can be shown in the right dimension while
loading the actual image.
2022-12-12 15:54:24 +00:00
Sophie Herold
b202c1d2d2 i18n: Remove regex usage 2022-11-26 02:03:53 +01:00
Sophie Herold
029c0c9244 image: Add zoom and scrolling support
Zoom via
- Scroll event controller
- Zoom gesture
- Overlay buttons
- Fixed zoom level shortcuts (1=100%, 2=200%)
Scrolling via
- Scrolled window
- Drag gesture
Changes
- Implement best-fit via calculating a zoom level
- Gesture for carousel no longer working because of scrolled window
- Split control overlays into two to not steal inputs in area between

Closes #17
2022-11-23 00:57:43 +01:00
Sophie Herold
a2e6767584 image: Add rotation and auto rotate based on exif 2022-11-04 18:52:33 +01:00
Sophie Herold
3d6564377a cargo: Update dependencies 2022-11-03 00:57:18 +01:00
Sophie Herold
7029e6129b cargo: Update dependencies and rust edition 2022-08-12 15:56:30 +02:00
Christopher Davis
81273c736e general: Update libadwaita-rs
Allows us to clean up our imports a bit.
2022-08-06 00:48:52 -04:00
Christopher Davis
1db46013d9 general: Add translation infrastructure 2022-08-05 19:09:17 -04:00
Christopher Davis
ba4661031f Implement Properties
Implement a properties sidebar. In order to prevent
the UI from freezing, we use futures to load and cancel
loading file information. We also make use of
`gdk_pixbuf` and `svg_metadata` in order to get the file's
metadata before the file fully loads, meaning there's
little to no delay between changing files and seeing
the metadata for large images.

The properties widget uses expressions and
properties to avoid glue code for setting each label,
allowing us to have a clean separation between UI
and data.
2022-08-02 19:31:44 -04:00
Christopher Davis
2aa480eee5 widgets: Rework image_view with AdwCarousel, add ImagePage
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.
2022-04-20 13:12:45 -07:00
Christopher Davis
8ac85e8fa5 build: Update Rust dependencies
Part of https://gitlab.gnome.org/BrainBlasted/loupe/-/issues/8
2022-02-04 15:40:52 -08:00
Christopher Davis
f7151e93d1 build: Use the latest stable Rust dependencies
Now that there's a release with template callback support,
we don't need to use git.
2022-01-19 17:29:46 -08:00
Christopher Davis
be70bdafe5 window: Implement drag and drop
The main page is no longer a lie.
2021-12-27 22:05:29 -08:00
Christopher Davis
5893d4b764 cargo: Use gtk-rs master
Needed to take advantage of template callbacks
and new APIs.
2021-12-22 18:17:38 -08:00
Christopher Davis
1ae7316b32 general: Consolidate explicit dependencies down to adw and gtk4
Use the exported dependencies for everything else.
2021-12-21 16:09:48 -08:00