Commit graph

22 commits

Author SHA1 Message Date
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
fc6d3668c0 Update gtk-rs deps for return value nullability trust 2022-01-08 22:18:40 -08:00
Christopher Davis
a12e7eed43 window: Use portal to open files in other apps
Calling `xdg-open` is the wrong thing to do, and has
flaky reliability. What we want is to use the portal
directly with the exact behavior we want.

When using the portal we can't just pass the uri -
we need to own a file descriptor.
2021-12-29 17:43:58 -08:00
Christopher Davis
56a47fb447 Update gtk-rs
This brings us a neat new function, `imp()`,
that lets us drop `from_instance()` everywhere.
2021-12-29 14:02:48 -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
Christopher Davis
cced598239 general: Rename to Loupe
Sets the codename, binary name, and app ID name to Loupe.
The user-visible name is still Image Viewer.
2021-09-28 17:44:26 -07:00
Christopher Davis
9833c1edc0 Update dependencies; Use new libadwaita dark style 2021-09-28 16:00:44 -07:00
Christopher Davis
1841789525 Update rust dependencies 2021-08-17 20:37:04 -07:00
Christopher Davis
73188840ae general: Use stable rust dependencies 2021-06-27 15:28:35 -07:00
Christopher Davis
f056c82ced Update rust dependencies 2021-03-02 16:42:04 -08:00
Christopher Davis
4561b1f4f8 Update Rust deps
Updates to subclassing and templates.
2021-01-30 15:52:32 -08:00
Christopher Davis
f49ef9b2d9 image_view: Use AdwBin
Gives us a little bit less manual work.
2021-01-23 23:36:28 -08:00
Christopher Davis
e34f4055e4 Exchange libhandy-4 for libadwaita
libhandy-4 is dead. Long live libadwaita.
2021-01-14 21:36:30 -08:00
Christopher Davis
28bf2b9213 Stop using .get() for template children
We can drop this completely now that Deref is implemented.
2021-01-13 23:16:02 -08:00
Christopher Davis
f692ab5626 Initial Commit
The initial commit of gnome-image-viewer.
Things are in an MVP state, with image viewing and
opening from the desktop functional. We also can
open images externally, print them, and set them as
backgrounds.
2020-12-26 02:18:23 -08:00