Commit graph

673 commits

Author SHA1 Message Date
sunflowerskater
6e632e7281 window: Update AdwStatusPage description
This change applies @bertob suggestion for an updated AdwStatusPage description:
https://gitlab.gnome.org/Incubator/Submission/-/issues/1#note_1641740
2023-01-20 03:13:45 +00:00
Christopher Davis
eae81ebc60 window: Use GtkFileLauncher
GtkFileLauncher handles using the portal when
appropriate.
2023-01-18 20:21:48 -05:00
Christopher Davis
9d7dae408b properties_view: Use GtkFileLauncher for opening directory
GtkFileLauncher handles opening the containing folder for
us, using the portal when appropriate
2023-01-18 20:21:15 -05:00
Sophie Herold
0c86d0d202 flatpak: Add libadwaita carousel patch for testing
Add the patch for now to get more test exposure

Issue #11
2023-01-15 19:24:07 +01:00
Christopher Davis
1dce6b75ae application: Use gio API for help
`show_uri ()` is deprecated
2023-01-14 14:44:50 -05:00
Christopher Davis
947b2101b2 application: Use gtk_window_present() instead of gtk_widget_show () 2023-01-14 14:43:46 -05:00
Christopher Davis
2757e94e08 window: Update use of FileDialog.open_future()
Requires an updated gtk-rs
2023-01-14 14:23:54 -05:00
Tobias Bernard
9008c394f4 icon: New, unique app icon 2023-01-10 22:57:28 +01:00
Philip Goto
3f8921198d Update POTFILES 2022-12-28 21:19:40 +01:00
sunflowerskater
2817e9bca6 window.ui: Rename Primary Menu to Main Menu
Currently, the "Main Menu" tooltip is "Primary Menu". However, HIG advises to use "Main Menu" instead:
https://developer.gnome.org/hig/patterns/feedback/tooltips.html

This commit changes the button tooltip to "Main Menu".
2022-12-21 19:03:59 -03:00
Sophie Herold
ec45132a97 exif: Do not display city if more than 100 km away
Display GPS coordiantes instead
2022-12-19 19:24:23 +01:00
Sophie Herold
cc52f7a542 propertiesView: Move location to top of section
It just looks better with icon and it makes sense content wise imo
2022-12-19 18:44:23 +01:00
Sophie Herold
4b9c91f8df exif: Show device maker more consitently
Also, don't call it camera because it can be a scanner etc as well
2022-12-19 18:44:08 +01:00
Sabri Ünal
cbde386126 help-overlay: Improve some shortcuts and help-overlay 2022-12-17 17:07:22 +00:00
Sophie Herold
36000ff65c window: Put prev/next accels at window level
Tried to make things more stateless and RefCell usage for robust
- Use object properties to control the action enabled/disabled
- Borrow model RefCell for only one line or use .replace()
- Don't pass models around and borrow as short as possible instead

Fixes #20
2022-12-16 18:27:45 +00: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
01bebfef38 imageView: Include overlay controls in min size
This stops the overlay controls to overlap for very small
window sizes and properties opened.

LpImageView already does custom measure and overlay is it's
direct child. So added it here.

Fixes #32
2022-12-12 12:01:24 -05: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
68221bacba file_model: Load opened image first add dir later
- Fixes image cannot be opened when directory unreadable
- Avoids bugs with wrong images being selected for an instant.
  Mostly important for adjusting the window size to image.
- Basis for prioritizing loading the important image first
2022-12-12 15:54:24 +00:00
Sophie Herold
acd8bea356 README: Add bundle download url and screenshot 2022-12-08 17:55:57 +01:00
Sophie Herold
ccfbcf60a8 image: Calculate next zoom step from target
This fixes that clicking a button/key during an animation
does not give you the expected zoom speedup.
2022-11-29 00:04:13 +01:00
Sophie Herold
78e528d299 image: Also snap into 'best-fit' if close to it
If only 1/4 of a zoom step zoomed in, assume best-fit.
This helps with floating point precision when zooming in and
out again. It also removes akward other minimal zoom steps.
This change centralizes part of the best-fit detection.
2022-11-28 23:43:56 +01:00
Sophie Herold
c1a3cc353d image: Limit zoom to 2000% 2022-11-28 23:24:12 +01:00
Sophie Herold
d6ab100062 image: Use FileList in ContentProvider
Makes dragging an image out of Loupe work in most cases.
There seems to be an issue with dragging from flatpak to host.
Removing the png from the provider seems to avoid gdk crashes
but not 100% sure that was the cause.
2022-11-28 19:34:18 +01:00
Sophie Herold
b202c1d2d2 i18n: Remove regex usage 2022-11-26 02:03:53 +01:00
Sophie Herold
f1593203a0 window: Add missing shortcuts
Add shortcuts
- F9 Image properties
- F10 Main menu
- Ctrl +/- for zoom
- Ctrl 0 for best fit
- Ctrl [Shift] R for rotate
- Escape to leave fullscrenen
Updated help overlay accordingly.
2022-11-25 15:46:35 +01:00
Christopher Davis
583794a3ec general: Use glib::Object::builder for objects w/ props
Builders are more idiomatic rust code than the old
pattern.
2022-11-24 13:06:53 -05:00
Christopher Davis
d1d53e4f4a properties_view: Use ParamSpec builders for props 2022-11-24 13:06:53 -05:00
Sophie Herold
3876f55b4c about: Change app name to Loupe and update devs
- Rename to Loupe to avoid confusion during incubation
  and potentially allow for release on Flathub
- Replace GNOME as developer since it violates software policy
- Put a more useful copyright statement
- Add me as developer
2022-11-23 21:10:03 +00:00
Christopher Davis
aa781d3864 application: Use gio::ActionEntryBuilder for actions
Allows us to drop the action! macro and usage of the clone! macro
in the application file.

The first occurrence of clone! is now in window.rs, so the comment
explaining it has moved there.
2022-11-23 19:56:51 +00:00
Sophie Herold
29198b68f9 doap: Add doap file 2022-11-23 19:05:52 +00:00
Sophie Herold
ab4981a4e1 data: Add metainfo 2022-11-23 18:13:01 +00:00
Christopher Davis
94086b1650 properties_view: Add comment explaining the purpose of build_dimensions()
Sophie Herold mentioned that it's not entirely clear why we're
loading the image data again here. This comment should explain why
to future readers.
2022-11-23 01:30:14 +00:00
Christopher Davis
e48517d646 README: Check off pan/zoom item 2022-11-22 19:54:10 -05: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
73a1702c47 meson: Cleanup and fix warnings 2022-11-10 19:48:34 +00:00
Sophie Herold
49e595cda2 image: Support rotate gesture 2022-11-10 20:25:11 +01:00
Sophie Herold
c2e3bb2f83 menus: Add rotate left and right buttons 2022-11-06 17:58:02 +01:00
Sophie Herold
57f573f98a ui: Fix quotation marks 2022-11-04 20:48:32 +01:00
Sophie Herold
0f7115fe8b imageMetadata: Implement debug 2022-11-04 20:12:44 +01:00
Sophie Herold
db69cbe64e window: Do not panic on failed drag-and-drop 2022-11-04 20:12:15 +01:00
Sophie Herold
165861568c imageView: Fix two panics when file not exists 2022-11-04 19:28:48 +01:00
Sophie Herold
369b71b15c code: Fix clippy warnings 2022-11-04 19:27: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
AsciiWolf
743577757f data: Rename appdata to metainfo
The appdata file/directory name is deprecated.

Also change the desktop component type to desktop-application. Same reason.
2022-10-06 16:38:46 +02:00
Christopher Davis
20c336b17f image_view: Fix carousel scrolling when loading files in same dir
With https://gitlab.gnome.org/GNOME/libadwaita/-/merge_requests/652
merged
we no longer crash when loading files from the same directory.
Now that we don't crash, we've exposed a logic error: we were
changing the state of the carousel while scrolling through it,
which ends with the carousel in a weird state.

This commit delays clearing and refilling the carousel until
after the `page-changed` signal is emitted.
2022-08-19 12:06:07 -04:00
Elton A Rodrigues
8679734a43 general: change wallpaper to background
- Change wallpaper term to background(string and code)
- Remove toast error when cancel background portal
2022-08-18 09:42:25 -03:00
Elton A Rodrigues
2f9c7793c8 window: Add "open..." to menu
add an option in menu to open new image
2022-08-17 21:20:02 -03:00