Commit graph

35 commits

Author SHA1 Message Date
Sophie Herold
2412fb90ee slidingView: Set current page before starting animation
If animations are disabled, the animation ends when calling play
returns. Therefore, everything has to be set before calling play when
animations can be disabled.

Closes #368
2024-09-04 20:38:52 +02:00
Sophie Herold
0b33553144 util/gettext: Parse unicode escape sequences
Closes #351

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/426>
2024-07-17 19:33:52 +02:00
Fina Wilke
5956aa6460 code: clone macro: Use convenience attributes instead of upgrade_or_else
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/412>
2024-07-02 22:54:24 +00:00
Sophie Herold
e9dc3d810c code: Use new glib::clone! syntax 2024-06-18 00:37:38 +02:00
Sophie Herold
23918bf31e slidingView: Fix non-animated page changes
Add missing signal for ended animation and fix wrong index juggling.
2024-02-05 17:25:44 +01:00
Sophie Herold
6958f427bd application: Shortcuts for non-animated next/prev
Don't animate switching between images for Alt+Arrow.

Closes #45
2024-01-31 23:34:25 +01:00
Sophie Herold
e4ee49c2a1 SlidingView: Properly animate fast scrolling 2024-01-28 20:57:19 +00:00
Sophie Herold
f1f8ba9a88 SlidingView: Fix animation for deleting images 2024-01-28 20:57:19 +00:00
Sophie Herold
47cb0e0acb SlidingView: Stop using gtk_widget_get_allocation
It got deprecated. Hopefully "width" does what we need.
2024-01-28 20:57:19 +00:00
Sophie Herold
784c53b318 slidingView: Use stacked cards animation for steps
Use an animation with less motion for navigation through images with
arrow keys and buttons. For skipping multiple images and for using the
touchpad, the animations stay the same.

Closes #245
2024-01-08 20:31:40 +00:00
Sophie Herold
476abf1612 slidingView: Don't notify page updates emmediately
This allows to add new pages after clearing without triggering an empty
state in between. This also fixes opening a new image leaving the
fullscreen mode.

Fixes #286
2023-12-21 21:28:37 +01:00
Sophie Herold
2648295a18 code: Reformat with group_imports=StdExternalCrate 2023-12-07 20:33:19 +01:00
Sophie Herold
b56d650086 code: Reformat with new rules 2023-11-29 21:16:11 +01:00
Sophie Herold
7d36c93029 slidingView: Use properties macro 2023-11-29 19:28:27 +01:00
Sophie Herold
229c63719e meta: Prepare 45.2 2023-11-21 20:55:03 +01:00
Sophie Herold
8cb14169db slidingView: Allow WidgetExt::allocation for now
Has been deprecated but not sure what is the correct replacement
2023-08-16 12:21:59 +02:00
Sophie Herold
0cff205c9d general: Update to gtk-rs 0.7 2023-08-06 11:24:01 +02:00
Alice Mikhaylenko
0d267e5219 slidingView: Enable overshoot
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/261>
2023-07-27 20:30:24 +00:00
Sophie Herold
55551ae6a2 general: Update copyright notices
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/258>
2023-07-18 17:48:43 +00: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
2f9fad47a1 src: Update or add auto generated license headers
Closes #55

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/169>
2023-04-19 20:02:01 +02:00
Sophie Herold
fad8bb7939 decoder: Use GFile instead of PathBuf
This allows to show images from locations that don't
have a representation with path.

This also works around not being able to read files in trash:///

Closes #56

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/174>
2023-04-18 16:22:49 +00: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
7b7ece1dc3 slidingView: Allocate LpImage more correctly
Allocate the ScrolledWindow instead of the LpImage
to include non-overlayed scrollbars.

General cleanup how we measure things.

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/150>
2023-04-02 15:42:42 +00:00
Sophie Herold
f33c4bd470 decoder: Support animated formats (GIF, WEBP, APNG)
Closes #27
2023-03-18 20:23:08 +00:00
Sophie Herold
f12ff1ea4d widgets: Add some widget descriptions 2023-03-06 22:59:40 +01: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
Christopher Davis
34b3fb12de sliding_view: Unparent all children on dispose
This is something all GtkWidget subclasses are supposed to do
with all direct children.
2023-03-05 02:13:41 +00:00
Lubosz Sarnecki
30136f9050 code: Fix some typos.
Fix some typos, mainly in comments with the power of
Builder's spell correction.
2023-02-21 00:19:05 +01:00
Sophie Herold
004ebd5615 cargo: Update dependencies 2023-02-15 17:04:59 +01:00
Sophie Herold
75cb4ad58f slidingView: Fix swiping on touchscreens
The width of one page is measure by a unit of 1.0.
So this is the correct value
2023-02-10 21:45:34 +01:00
Sophie Herold
cf03d357a0 slidingView: Add space between images 2023-02-10 17:35:26 +00:00
Sophie Herold
ce1cb0d299 slidingView: Add RTL support
Issue #38
2023-01-31 01:08:56 +00: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