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.
This commit is contained in:
Sophie Herold 2022-11-16 20:14:39 +01:00 • committed by Christopher Davis
parent 68221bacba
commit e04992b46d
12 changed files with 389 additions and 79 deletions

View file

@ -53,11 +53,13 @@
<object class="AdwStatusPage" id="error_page">
<property name="icon-name">image-missing-symbolic</property>
<property name="title" translatable="yes">Could not Load Image</property>
<property name="description" translatable="yes">This image could be corrupted or may use an unsupported file format.</property>
<property name="description" bind-source="LpImagePage" bind-property="error"/>
</object>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="propagate-natural-height">True</property>
<property name="propagate-natural-width">True</property>
<property name="child">
<object class="LpImage" id="image">
<child>