Commit graph

183 commits

Author SHA1 Message Date
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