Commit graph

200 commits

Author SHA1 Message Date
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
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
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
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
Sophie Herold
ab4981a4e1 data: Add metainfo 2022-11-23 18:13:01 +00: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
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
a2e6767584 image: Add rotation and auto rotate based on exif 2022-11-04 18:52:33 +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
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
Christopher Davis
d443107146 build: Drop join_paths() in favor of / 2022-08-05 00:39:50 -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
1e95dd4cbb image_view: Expose file as a property instead of filename
The GFile is more useful for other data. The window can
use expressions to calculate an appropriate title, so
we no longer need to call `set_title()` or connect to
a signal manually.

This commit also adjusts the `uri()` and `print()`
functions to use `active_file()`
2022-08-02 19:30:08 -04:00
Christopher Davis
9ba6cced6c window,image_view: Move fullscreen controls to the image view
Allan Day's latest mockups have the fullscreen icon on the bottom
left of the image. This commit moves the icon there, using a
GtkExpression for the icon name.
2022-07-14 17:35:20 -04:00
Christopher Davis
689f975bf0 window: Add copy button to top left
Allan Day's latest mockups put a copy button in the top left
of the window. This commits adds the button and the toast along
with it.
2022-07-14 16:27:38 -04:00
Christopher Davis
fadb6bfb9b image_view: Move controls to the bottom
Per Allan Day's latest mockups
2022-07-14 16:27:38 -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
f88c48ca69 desktop: Add Loupe as a keyword
Allows us to search by code/bin name in GNOME
Shell
2022-02-04 23:58:53 +00:00
Maximiliano Sandoval R
be09d49756
image: Implement Copy to clipboard 2022-01-08 23:59:56 +01:00
Christopher Davis
400672b6b6 window: Add ToastOverlay and use toasts for feedback 2021-12-28 16:40:58 -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
5d9567507c window: Add "Open File..." button, remove gesture
This gives users a very intuitive way to open files.
The gesture was awkard and didn't match any common patterns
across GNOME. The button is simple and obvious.
2021-12-23 20:35:22 -08:00
Christopher Davis
5c25a6a270 application: Use standard shortcut for help overlay
Ctrl+F1 never really worked - that was chosen based
on the mockups, but in reality it only opened Help.
Apps usually use Ctrl+?.
2021-12-22 16:02:17 -08:00
Christopher Davis
d4fca8aae3 general: Iv* to Lp*
We're probably going to be keeping `loupe` as the codename
and binary name going forward.
2021-12-21 10:55:02 -08:00
Christopher Davis
4d1141a675 widgets: split view and image
This will make implementing a more comprehensive photo view simpler.
2021-12-20 08:37:50 -08:00
Christopher Davis
5e7965ff4a window: Disable swipes on the flap
We don't want or need these for this case.
2021-10-08 05:50:49 -07:00
Christopher Davis
1e0732ac92 ui: Add tooltips to buttons 2021-09-29 00:38:07 -07:00
Christopher Davis
f7553e02a4 More typography fixes 2021-09-29 00:38:07 -07:00
Christopher Davis
02694cc8da window: Adjust sentence casing and typography 2021-09-29 00:38:07 -07: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
e41acf0701 window, image_view: Cleanups
* Move context menu model to image_view.ui
* Remove useless property assignment
2021-09-24 06:12:37 -07:00
Christopher Davis
293dc3c124 window: Bind headerbar opacity to controls
No purpose yet, but will help when we want to implement
fading. Need to have support for closures in Rust first.
2021-09-24 05:58:55 -07:00
Christopher Davis
e45b89f854 window: Rework fullscreen
We can use AdwFlap and have one single headerbar for both
fullscreen and unfullscreened.
2021-09-24 01:18:31 -07:00
Christopher Davis
0c62962d06 application: Subclass AdwApplication
AdwApplication automatically handles styling for us.
2021-09-23 08:05:34 -07:00
Christopher Davis
decba30212 css: Use @theme_base_color
This works better with the new OSD styling and with
transparency.
2021-09-22 22:39:12 -07:00
Christopher Davis
52af944521 css: Make checkerboard style less specific 2021-09-22 22:13:32 -07:00
Christopher Davis
f15491af78 css: Remove custom header styling
Adwaita handles this well enough now.
2021-09-22 22:12:33 -07:00
Christopher Davis
c6ff46a578 css: Add styling for checkerboard 2021-09-22 20:49:31 -07:00
Christopher Davis
1ea7ff9b09 image_view: Set focus-on-click to true 2021-09-14 19:48:24 -07:00
Christopher Davis
84208d2887 image_view: Add directory navigation
This commit adds directory navigation to Image Viewer.
Currently it only sorts images by name, instead of following
directory sorting like the mockups.
2021-09-14 04:21:34 -07:00
Christopher Davis
b2a15242be image_view: Bind properties in UI file 2021-01-23 23:57:55 -08:00
Christopher Davis
f621fedbba window: bind properties in UI file
This is possible, and allows us to clean up constructed
a bit.
2021-01-23 23:46:33 -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
5dc42c776a window: remove show-title-buttons
This is true by default.
2021-01-23 22:24:18 -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
5d8c6756e2 data: Disable appdata test
This test isn't needed for now.
2020-12-29 20:29:08 -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