Sophie Herold
08a9c3e450
window: Remove default drop target style
...
The default does not fit well with our new custom one.
This also removes a bunch of code which was not used.
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/258 >
2023-07-18 17:48:43 +00:00
Sophie Herold
cf8fa499d9
window: New way to detect own window in d+d
...
This is a (hopefully) cleaner way to detect if we are
dragging out of the own window to not show drag indicator
in that case.
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/258 >
2023-07-18 17:48:43 +00:00
FineFindus
78b16518e5
window: Use custom overlay visual for drop target
...
Closes #59
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/258 >
2023-07-18 17:48:43 +00:00
qwel
3111efdd94
window: First work for drag overlay visuals
...
Issue #59
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/258 >
2023-07-18 17:48:43 +00:00
Christopher Davis
186401fb57
general: Change user-facing name to Image Viewer
...
This is part of the move to Core.
Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/256 >
2023-07-13 21:51:09 +00:00
Sophie Herold
06d688e79e
src: Format let-else statements
2023-07-07 19:22:51 +00:00
FineFindus
bc9aff5068
refactor: Use is_some_and
2023-06-26 11:59:17 +00:00
FineFindus
52057aba65
window: Disable trash for non-native files
2023-06-23 19:42:30 +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
Huan Thieu Nguyen
ffb2e1064d
window: Toast priority high to push old toast to queue.
2023-06-21 19:13:46 +00:00
Sophie Herold
eb94683d1f
fileChooser: Only list supported image formats
...
Closes #151
Part-of: <https://gitlab.gnome.org/GNOME/Incubator/loupe/-/merge_requests/238 >
2023-06-21 10:03:38 +00:00
Sophie Herold
291fa13d1f
meta: Update copyright headers
2023-06-07 23:44:20 +02:00
Huan Nguyen
735451250c
imageView: Merge set_image_from_file with set_images_from_files
...
Also changing behavior when opening with multiple command line
arguments or when multiple images were selected from other
applications.
Old behavior: Spawn an instance of Loupe for each argument.
New behavior: One Loupe instance containing all arguments.
Closes #195
2023-05-30 12:52:59 +00:00
Huan Thieu Nguyen
c6897da62d
window: Let the user select multiple files to open.
...
Uses code that drag and drop already uses. It's kinda ugly because the
file dialog returns a ListModel.
As an added bonus, since the button responds to the action "win.open",
it will also allow open multiple files with the primary menu.
It would be a good idea to change the "Open…" label in the primary menu though.
Closes #191
2023-05-21 23:41:22 +02:00
Huan Nguyen
8804938859
window: Support forward and back mouse buttons
...
The button value for forward is 9. See <GNOME/gtk#515>.
Closes #172
2023-05-21 16:17:48 +00:00
Sophie Herold
dbb65fa2cb
window: Better solution for swipe sending motion
...
Swipe gestures send motion events without changed cursor position.
Catch that in a better way to avoid showing overlay controls on swipe.
2023-05-03 22:22:05 +02:00
Sophie Herold
24bbd7eae2
window: Show controls on mouse click
2023-05-03 22:22:03 +02:00
Sophie Herold
a8693c50ef
fullscreen: Hide headerbar on idle
...
Closes #154
2023-05-03 22:21:18 +02:00
Sophie Herold
3d6940cd45
image: Show window after 2 secs if dims unknown
...
Usually we want to wait for dimensions to show the window in correct
apsect ration. But especially for large SVGs dimensions are only known pretty late.
Show the image to give UI feedback instead of waiting for dimensions.
Closes #146
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/209 >
2023-05-03 19:16:17 +00:00
Sophie Herold
0a94484bab
window: Leave fullscreen when status page is shown
...
We don't allow to fullscreen without image. So if last image
is deleted, let's leave fullscreen since there are no controls
to leave it.
Closes #150
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/208 >
2023-05-03 18:14:19 +00:00
Sophie Herold
fac2d360b6
meta: Update copyright headers
2023-04-26 18:19:23 +02:00
Sabri Ünal
32ee47d08f
app: Split rotate actions
...
To ensure simplicity of the process, replace the rotate actions
with new two actions, without modifying the existing rotate_image method.
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/201 >
2023-04-25 17:51:43 +00:00
Sophie Herold
b30296f994
window: Hide cursor with controls fullscreened
...
Closes #149
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/197 >
2023-04-25 00:05:24 +00:00
Sophie Herold
9d5dfd8728
window: i18n for filter name and add 'all files'
...
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/195 >
2023-04-21 16:53:12 +02:00
Sophie Herold
4037b124d2
window: Properties button insensitive for no image
...
Make the toggle button insensitve if no image is shown.
Also close the properties if no image is shown anymore.
Closes #60
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/193 >
2023-04-20 20:11:17 +00:00
Sophie Herold
2dbc7fa585
window: Drop AdwFlap for Headerbar
...
Redo everything headerbar related with new Adw widgets
when there is a working concept.
Closes #112
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/192 >
2023-04-20 19:49:16 +00:00
Sophie Herold
916514604c
imageView: Hide controls after mouse inactivity
...
Closes #25
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/189 >
2023-04-20 15:18:06 +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
792968e51b
window: Set action states based on current_page
...
Fixes actions not getting enabled and disabled
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/184 >
2023-04-19 01:46:15 +00:00
Sophie Herold
ae5ca76176
printing: Add printing support
...
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/165 >
2023-04-18 23:52:53 +00:00
Sophie Herold
e96b9ccac9
image: More fine-grained zoom instructions
...
Add parameters to use zoom_to without animation or
snapping to best fit. Hopefully fixing 100%/200% snapping
to best fit when close to filling the window and
fixing high res scroll wheel bugs.
Closes #120 , #134
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/177 >
2023-04-18 23:23:18 +00:00
Sophie Herold
aca49427a1
window: Support dropping multiple files
...
This allows to scroll through all dropped files.
No further images from directories are loaded in
this mode.
Closes #35
2023-04-18 22:29:30 +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
f8cc9f5f84
i18n: Use gettext function instead of wrapper
...
No need to deviate from the default here.
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/170 >
2023-04-12 12:58:40 +00:00
Sophie Herold
8b3cfd000a
cargo: Remove gtk-macros dependency
...
Using the crate is depreacted. Replaced spawn! macro
with our own spawn function
2023-04-06 21:08:33 +00:00
Sophie Herold
889c818c14
code: Use pub(super) in GObject impl structs
...
This helps with getting warnings for fields we no longer use
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/143 >
2023-03-14 21:25:45 +00:00
Sophie Herold
f8e64d9805
trash: Use non-existing name when restoring image
...
We usually use the original path of the image.
For the rare case the original file name exists we create
one that is not used yet.
Closes #66
Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/130 >
2023-03-14 00:07:08 +00: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
4d4bc4bb38
application: Stop using expressions
...
This commit moves the logic from the expressions to the
window via GSignalGroup.
2023-03-05 02:13:41 +00:00
Christopher Davis
3d445f25fe
window: Use GSignalGroup to watch zoom levels
...
This allows us to git rid of more expression code.
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
74a067e3b8
window: Fix Left/Right button direction for RTL
...
This also fixes the issue with the buttons triggering
focus changes when the action is deactivated because buttons
know have their own action.
Fixes #44
Issue #38
2023-02-06 21:07:23 +01:00
Sophie Herold
69889820cd
window: Add Home/End shortcuts for first/last img
...
This is the same as in EOG.
Also add PageUp/Down for image navigation from EOG.
Cleanup the navigation enums as well.
2023-02-06 19:14:55 +01:00
Sophie Herold
aa7a2dfd93
window: Add image deletion
...
Add Flatpak access to GVfs for trash:/// access for being
able to recover files (undo trash operation).
Closes #26
2023-02-02 00:45:40 +00:00
Sophie Herold
4eb8b939b3
application: Add shortcuts for paning the view
...
Closes #54
2023-01-31 04:56:58 +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
Christopher Davis
7b7435f50a
general: Use spawn! less
...
Because widgets can install async actions, we can simply
turn our callbacks into async functions.
2023-01-22 19:55:42 +00:00
Christopher Davis
eae81ebc60
window: Use GtkFileLauncher
...
GtkFileLauncher handles using the portal when
appropriate.
2023-01-18 20:21:48 -05:00