Commit graph

119 commits

Author SHA1 Message Date
Sophie Herold
be32072d7a image: Keep texture around until new is available
Keep previous texture around during image reloads to avoid flickering.
2024-08-16 13:30:18 +02:00
Sophie Herold
e08866a1da image: Use enum for specific errors 2024-07-19 21:24:11 +00:00
Sophie Herold
798f2584ee code: Update copyright headers 2024-06-28 23:00:14 +02:00
Sophie Herold
afcc24e235 editor: Apply rotation to files 2024-06-21 13:11:29 +02:00
Sophie Herold
e9dc3d810c code: Use new glib::clone! syntax 2024-06-18 00:37:38 +02:00
Sophie Herold
5295c63b91 data: Update changelog 2024-04-03 01:41:21 +02:00
Maximiliano Sandoval
41c26daba2 image: Use const for RGBA::new 2024-03-21 19:54:21 +00:00
Sophie Herold
0ed7036098 cargo: Update gtk-rs stack 2024-02-08 21:19:05 +01:00
Sophie Herold
a7116925bf debug: Add more tracing for initial operations 2024-02-08 00:57:33 +01:00
Sophie Herold
f1f8ba9a88 SlidingView: Fix animation for deleting images 2024-01-28 20:57:19 +00:00
Sophie Herold
0d060f6790 image: Occupy 40% instead of 30% screen area
Closes #272
2024-01-19 15:47:16 +00:00
Sophie Herold
e0df6fc725 image/rendering: Clamp natural size correctly 2024-01-19 15:47:16 +00:00
Sophie Herold
171077ffc7 window: Resize to natural on map
Only at this point we can be certain about the screen info like size an
scaling factor.
2024-01-19 15:47:16 +00:00
Sophie Herold
0d21222dcd meta: Release 46.alpha 2024-01-08 17:41:54 +01:00
Sophie Herold
88099b1ec9 image/zoom: Make code more readable 2024-01-04 14:37:11 +01:00
Sophie Herold
56625f2309 image/zoom: Store pointer target through animation
Closes #48 #287
2024-01-04 14:37:04 +01:00
Sophie Herold
fe43bc3a4c metadata: Centralize many loose ends 2024-01-01 22:43:30 +01:00
Sophie Herold
db6a7e7f2a image: Move most functions to imp module 2023-12-27 00:12:35 +01:00
Sophie Herold
3d5ef4038e image: Rename background_color module 2023-12-26 22:28:45 +01:00
Sophie Herold
139bd4ebb2 decoder/tiling: Make shared frame buffer a struct 2023-12-26 22:09:07 +01:00
Sophie Herold
6827a9c176 print: Use LpImage for preview 2023-12-26 21:51:39 +01:00
Sophie Herold
d3cd32e090 code: Drop async-std dependeny 2023-12-25 20:53:46 +00:00
Sophie Herold
2648295a18 code: Reformat with group_imports=StdExternalCrate 2023-12-07 20:33:19 +01:00
Sophie Herold
057ca6a3d0 image/rendering: Use scale instead of scale-factor
`GdkSurface:scale` supports fractional scaling available as
"scale-monitor-framebuffer" on Mutter. Use this value everywhere
instead of the integer scale-factor

Closing #182
2023-12-06 23:39:09 +01:00
Sophie Herold
3ab4d82d36 image: Reorganize into several sub-modules 2023-12-05 16:00:46 +01:00
Sophie Herold
cfed1d3d63 image: File doesn't have to be a property anymore 2023-12-04 18:42:21 +01:00
Sophie Herold
33bcd4a7ac imageView: Remove expression for fullscreen icon 2023-12-04 18:22:47 +01:00
Sophie Herold
2fdfe5657c image: Refresh file info after file rename 2023-12-04 18:08:25 +01:00
Sophie Herold
c0f435386d metadata: Move file info and format to metadata 2023-12-04 18:08:25 +01:00
Sophie Herold
c36e7f4eb6 code: Replace many uses of GtkExpressions
Closes #276, #100
2023-12-04 18:08:20 +01:00
Sophie Herold
b56d650086 code: Reformat with new rules 2023-11-29 21:16:11 +01:00
Sophie Herold
55811a2bb7 image: Use macro for object properties 2023-11-29 18:52:31 +01:00
Julian Hofer
cd8188a1bb Simplify async code
- Update Cargo.lock
- Use new gtk-core API
- Remove unneeded async
- Remove unneeded clones

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/310>
2023-11-22 09:12:36 +01:00
Sophie Herold
a1edf6f882 image: Show image after error in file resolved
LpImage already reloads the image after an image is
invalid because of unsupported format or decoding error.
This patch makes that the "is-loaded" property is changed
to true again after the problem is resolved by a file change.

This should also hopefully works around problems with apps like GIMP
writing files in a way where an error appears itermittently.

Closes #256
2023-11-16 22:59:19 +00:00
Sophie Herold
8b2b12a206 image: Always request tiles in set_zoom_target
This makes zoom for SVGs work again. Not entirely clear
why this is needed but a safe fix for now.

Closes #240

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/301>
2023-10-31 01:01:27 +00:00
Sophie Herold
65a5f39861 image: Force minimum tile size of 1000x1000
Everything else does not make sense loading performance
wise.

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/276>
2023-08-16 08:44:41 +00:00
Sophie Herold
07513f5940 image: Don't render first tiles with zoom=1
Closes #145

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/276>
2023-08-16 08:44:41 +00:00
Sophie Herold
270853ea57 image: Reload image on FileMonitor Renamed events
The Rename event is also fired if the file got replaced
via a file move.

Closes #227

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/271>
2023-08-08 16:27:03 +00:00
Sophie Herold
0cff205c9d general: Update to gtk-rs 0.7 2023-08-06 11:24:01 +02:00
Sophie Herold
c4d8145dd3 image: Deny drag gesture for touchscreens
ScrolledWindow can handle the panning in images
better than we can.

This fixes an issue where zoomed in images can't
be zoomed or rotated on touchscreens.

Issue #176

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/264>
2023-07-31 21:08:58 +02: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
Sophie Herold
06d688e79e src: Format let-else statements 2023-07-07 19:22:51 +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
cc1c8a3da5 image: Use contains in modifier type flag checks
This, for example, allows to also pan the image
with Ctrl+Shift+Scroll like in EOG.

Closes #175

Part-of: <https://gitlab.gnome.org/GNOME/Incubator/loupe/-/merge_requests/237>
2023-06-20 20:42:14 +00:00
Sophie Herold
0c2bdbd736 image: Do not guess bg color for opaque images
In theory this feature made sense to see a black square
but in practice it seems mostly confusing.

Closes #186

Part-of: <https://gitlab.gnome.org/GNOME/Incubator/loupe/-/merge_requests/235>
2023-06-20 20:02:18 +00:00
Sophie Herold
c1422cf728 image: Notify when setting file property
This fixes new file names not being shown in HeaderBar
after renames.
2023-06-20 16:54:38 +02:00
Sophie Herold
2faef84321 image: Also set zoom target when not animating
This currently only seems to affect HighRes scrolling
where SVGs are not rendered for the zoom level.

Closes #185
2023-06-20 13:23:21 +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
24bbd7eae2 window: Show controls on mouse click 2023-05-03 22:22:03 +02:00
Sophie Herold
fab6558285 image: Cancel scroll deceleration on gesture
Seems like the deceleration from kinetic scrolling can
interact with gestures, making the image jump around.

Closes #103

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/211>
2023-05-03 19:50:47 +00:00