Christopher Davis
69e9c1b4fc
image: Remove new()
...
Since we already `#[derive(Default)]`, we don't need
a `new()` function to do the same thing
2022-02-04 15:48:14 -08:00
Christopher Davis
1737db370b
thumbnail: Remove ParentType
...
We don't need it for glib::Object
2022-02-04 15:44:42 -08:00
Christopher Davis
f06875de73
main: Remove gtk::init() and adw::init()
...
We don't need these since we use adw::Application
Part of https://gitlab.gnome.org/BrainBlasted/loupe/-/issues/8
2022-02-04 15:44:08 -08:00
Christopher Davis
3092f7ed88
application: Remove gtk::Settings
...
These were unused.
Part of https://gitlab.gnome.org/BrainBlasted/loupe/-/issues/8
2022-02-04 15:42:11 -08:00
Christopher Davis
4c81f4d286
image: Use clearer ratio names
...
`ratio` and `pic_ratio` were confusing names. Rename
them to `widget_ratio` and `texture_ratio` to be
more clear.
2022-01-19 19:16:57 -08:00
Christopher Davis
f7151e93d1
build: Use the latest stable Rust dependencies
...
Now that there's a release with template callback support,
we don't need to use git.
2022-01-19 17:29:46 -08:00
Maximiliano Sandoval R
13d7a21501
Implement drag source on images
...
Using a 128x128 thumbnail.
2022-01-09 00:22:50 -08:00
Christopher Davis
fc6d3668c0
Update gtk-rs deps for return value nullability trust
2022-01-08 22:18:40 -08:00
Maximiliano Sandoval R
be09d49756
image: Implement Copy to clipboard
2022-01-08 23:59:56 +01:00
Christopher Davis
7b760f85f4
image_view: Use window identifier for wallpaper portal
...
Makes the dialog modal.
2021-12-29 18:46:55 -08:00
Christopher Davis
a12e7eed43
window: Use portal to open files in other apps
...
Calling `xdg-open` is the wrong thing to do, and has
flaky reliability. What we want is to use the portal
directly with the exact behavior we want.
When using the portal we can't just pass the uri -
we need to own a file descriptor.
2021-12-29 17:43:58 -08:00
Christopher Davis
56a47fb447
Update gtk-rs
...
This brings us a neat new function, `imp()`,
that lets us drop `from_instance()` everywhere.
2021-12-29 14:02:48 -08: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
5893d4b764
cargo: Use gtk-rs master
...
Needed to take advantage of template callbacks
and new APIs.
2021-12-22 18:17:38 -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
1ae7316b32
general: Consolidate explicit dependencies down to adw and gtk4
...
Use the exported dependencies for everything else.
2021-12-21 16:09:48 -08:00
Christopher Davis
f9cbad9ad9
general: Use adw alias for libadwaita
...
This will make writing libadwaita-based code a bit
nicer, and make it nicer when we use crates that
libadwaita's API re-exports.
Also clean up the unused imports exposed by
this change.
2021-12-21 14:56:25 -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
125d843413
image_view: Remove unused import
2021-09-29 01:08:57 -07:00
Christopher Davis
363cbc85bc
image_view: Remove present()
...
Using a layout manager actually does this for us.
2021-09-29 01:00:31 -07:00
Christopher Davis
8361c3a7d4
image_view: Show previews for wallpapers
...
In case we decide to do cool things the preview later.
2021-09-29 00:42:53 -07:00
Christopher Davis
3ca0eb4d02
application: Update year
2021-09-29 00:38:07 -07:00
Christopher Davis
0d37d123c9
image_view: Add note to investigate printing
...
This is one of the features we need for the MVP,
but printing is a bit beyond my current knowledge.
So, I need to research this. Onto other things for
now, so I'll add note.
2021-09-29 00:38:07 -07:00
Christopher Davis
945aff3029
image_view: Load images once
...
We don't need to load the file twice just to get the
dimensions. We can load a GdkTexture, use it's APIs
for the width and height, and return that as a result
to the window. This allows us to kill the `dimensions-loaded`
signal and one of the places where we need to load a file.
2021-09-29 00:38:04 -07:00
Christopher Davis
6fbad6d6ce
application: Formatting
2021-09-28 17:56:33 -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
9833c1edc0
Update dependencies; Use new libadwaita dark style
2021-09-28 16:00:44 -07:00
Christopher Davis
3ec5ad42db
Remove widgets::init()
...
We don't need this since `TemplateChild` registers the type for
us now.
2021-09-24 06:25:33 -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
e589028f1b
application: Set the active window for show_uri ()
2021-09-23 08:05:34 -07:00
Christopher Davis
0c62962d06
application: Subclass AdwApplication
...
AdwApplication automatically handles styling for us.
2021-09-23 08:05:34 -07:00
Christopher Davis
1687411536
general: clippy lint fixes
2021-09-22 22:57:54 -07:00
Christopher Davis
b85255a6be
application: Stop using add_window ()
...
This isn't needed since we use an ApplicationWindow
2021-09-22 21:56:15 -07:00
Christopher Davis
f9ac6470ad
window: Use gtk_widget_class_install_action ()
...
Simplifies our action handling a lot - we no longer need
to use the `action!` macro here, and we don't need
`lookup_action ()` to set the action state or activate
actions.
2021-09-22 21:33:47 -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
1841789525
Update rust dependencies
2021-08-17 20:37:04 -07:00
Christopher Davis
73188840ae
general: Use stable rust dependencies
2021-06-27 15:28:35 -07:00
Christopher Davis
fef57b242d
window, image_view: Resize window based on image size
...
Allows us to have a more appropriate size for the window
based on the content, instead of sticking with the small
default window size.
2021-03-02 16:43:17 -08:00
Christopher Davis
f056c82ced
Update rust dependencies
2021-03-02 16:42:04 -08:00
Julian Hofer
15dede1f1b
Run cargo fmt on source files
...
Also add rust-analyzer and flatpak-vscode specific folders to .gitignore
2021-02-06 20:59:17 +01:00
Christopher Davis
4561b1f4f8
Update Rust deps
...
Updates to subclassing and templates.
2021-01-30 15:52:32 -08: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
e34f4055e4
Exchange libhandy-4 for libadwaita
...
libhandy-4 is dead. Long live libadwaita.
2021-01-14 21:36:30 -08:00