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:
parent
68221bacba
commit
e04992b46d
12 changed files with 389 additions and 79 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<property name="focusable">True</property>
|
||||
<property name="focus-on-click">True</property>
|
||||
<property name="child">
|
||||
<object class="GtkOverlay">
|
||||
<object class="GtkOverlay" id="bin_child">
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="AdwCarousel" id="carousel">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue