diff options
author | Ferdinand Stehle <development@kondorgulasch.de> | 2025-02-22 16:32:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-22 09:32:33 -0600 |
commit | f796286650e4ad862b147e484d528ca56cf5e0e6 (patch) | |
tree | dbfdd6417cdacc6f410e56e937478d82fc2cf571 | |
parent | fc42c657eef9b6760c3296719b6fcc52852374ab (diff) | |
download | dino-f796286650e4ad862b147e484d528ca56cf5e0e6.tar.gz dino-f796286650e4ad862b147e484d528ca56cf5e0e6.zip |
Apply image orientation in conversation view (#1672)
* Apply image orientation in conversation
* Load the full image into pixbuf
---------
Co-authored-by: fiaxh <git@lightrise.org>
-rw-r--r-- | main/src/ui/conversation_content_view/file_image_widget.vala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/src/ui/conversation_content_view/file_image_widget.vala b/main/src/ui/conversation_content_view/file_image_widget.vala index a7a7bcc0..2b4d1765 100644 --- a/main/src/ui/conversation_content_view/file_image_widget.vala +++ b/main/src/ui/conversation_content_view/file_image_widget.vala @@ -157,7 +157,12 @@ public class FileImageWidget : Widget { public async void load_from_file(File file, string file_name) throws GLib.Error { FixedRatioPicture image = new FixedRatioPicture() { min_width=100, min_height=100, max_width=600, max_height=300 }; - image.file = file; + + // Work-around because Gtk.Picture does not apply the orientation itself + Gdk.Pixbuf? pixbuf = new Pixbuf.from_file(file.get_path()); + pixbuf = pixbuf.apply_embedded_orientation(); + image.paintable = Texture.for_pixbuf(pixbuf); + stack.add_child(image); stack.set_visible_child(image); } |