propertiesView: Do not propagate natural height

Propagating the height resulted in new window dimensions not
fitting to images.
Use ScrolledWindow instead of PreferencesPage to have
control over propagate-natural-height.
This commit is contained in:
Christopher Davis 2023-01-22 14:21:38 -05:00 • committed by Christopher Davis
parent ce1cb0d299
commit 0d74083cf8

View file

@ -3,268 +3,278 @@
<template class="LpPropertiesView" parent="AdwBin"> <template class="LpPropertiesView" parent="AdwBin">
<property name="width-request">255</property> <property name="width-request">255</property>
<property name="child"> <property name="child">
<object class="AdwPreferencesPage"> <object class="GtkScrolledWindow">
<child> <property name="child">
<object class="AdwPreferencesGroup"> <object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<property name="margin-top">24</property>
<property name="margin-bottom">24</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child> <child>
<object class="AdwActionRow"> <object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Folder</property> <child>
<property name="activatable-widget">folder_button</property> <object class="AdwActionRow">
<binding name="subtitle"> <property name="title" translatable="yes">Folder</property>
<closure type="gchararray" function="folder_name"> <property name="activatable-widget">folder_button</property>
<lookup name="file">LpPropertiesView</lookup> <binding name="subtitle">
</closure> <closure type="gchararray" function="folder_name">
</binding> <lookup name="file">LpPropertiesView</lookup>
<child type="suffix"> </closure>
<object class="GtkButton" id="folder_button"> </binding>
<property name="valign">center</property> <child type="suffix">
<property name="action-name">properties.open-folder</property> <object class="GtkButton" id="folder_button">
<property name="icon-name">folder-open-symbolic</property> <property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Open Containing Folder</property> <property name="action-name">properties.open-folder</property>
<property name="icon-name">folder-open-symbolic</property>
<property name="tooltip-text" translatable="yes">Open Containing Folder</property>
<style>
<class name="flat"/>
</style>
</object>
</child>
<style> <style>
<class name="flat"/> <class name="property"/>
</style> </style>
</object> </object>
</child> </child>
<style>
<class name="property"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Image Size</property>
<binding name="subtitle">
<lookup name="dimensions">LpPropertiesView</lookup>
</binding>
<style>
<class name="property"/>
</style>
</object> </object>
</child> </child>
<child> <child>
<object class="AdwActionRow"> <object class="AdwPreferencesGroup">
<property name="title" translatable="yes">File Type</property> <child>
<binding name="subtitle"> <object class="AdwActionRow">
<closure type="gchararray" function="file_type"> <property name="title" translatable="yes">Image Size</property>
<lookup name="file-info">LpPropertiesView</lookup> <binding name="subtitle">
</closure> <lookup name="dimensions">LpPropertiesView</lookup>
</binding> </binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">File Size</property>
<binding name="subtitle">
<closure type="gchararray" function="file_size">
<lookup name="file-info">LpPropertiesView</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">File Created</property>
<binding name="subtitle">
<closure type="gchararray" function="created_date">
<lookup name="file-info">LpPropertiesView</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">File Modified</property>
<binding name="subtitle">
<closure type="gchararray" function="modified_date">
<lookup name="file-info">LpPropertiesView</lookup>
</closure>
</binding>"
<style>
<class name="property"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<binding name="visible">
<lookup name="has-information">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Location</property>
<property name="activatable-widget">location_button</property>
<binding name="subtitle">
<lookup name="location">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="location">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<child type="suffix">
<object class="GtkButton" id="location_button">
<property name="valign">center</property>
<property name="action-name">properties.open-location</property>
<property name="icon-name">mark-location-symbolic</property>
<property name="tooltip-text" translatable="yes">Open Location</property>
<style> <style>
<class name="flat"/> <class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">File Type</property>
<binding name="subtitle">
<closure type="gchararray" function="file_type">
<lookup name="file-info">LpPropertiesView</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">File Size</property>
<binding name="subtitle">
<closure type="gchararray" function="file_size">
<lookup name="file-info">LpPropertiesView</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style> </style>
</object> </object>
</child> </child>
<style>
<class name="property"/>
</style>
</object> </object>
</child> </child>
<child> <child>
<object class="AdwActionRow"> <object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Originally Created</property> <child>
<binding name="subtitle"> <object class="AdwActionRow">
<lookup name="originally-created"> <property name="title" translatable="yes">File Created</property>
<lookup name="metadata">LpPropertiesView</lookup> <binding name="subtitle">
</lookup> <closure type="gchararray" function="created_date">
</binding> <lookup name="file-info">LpPropertiesView</lookup>
<binding name="visible"> </closure>
<closure type="gboolean" function="has_content"> </binding>
<lookup name="originally-created"> <style>
<lookup name="metadata">LpPropertiesView</lookup> <class name="property"/>
</lookup> </style>
</closure> </object>
</binding> </child>
<style> <child>
<class name="property"/> <object class="AdwActionRow">
</style> <property name="title" translatable="yes">File Modified</property>
<binding name="subtitle">
<closure type="gchararray" function="modified_date">
<lookup name="file-info">LpPropertiesView</lookup>
</closure>
</binding>"
<style>
<class name="property"/>
</style>
</object>
</child>
</object> </object>
</child> </child>
<child> <child>
<object class="AdwActionRow"> <object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Aperture</property> <binding name="visible">
<binding name="subtitle"> <lookup name="has-information">
<lookup name="f-number">
<lookup name="metadata">LpPropertiesView</lookup> <lookup name="metadata">LpPropertiesView</lookup>
</lookup> </lookup>
</binding> </binding>
<binding name="visible"> <child>
<closure type="gboolean" function="has_content"> <object class="AdwActionRow">
<lookup name="f-number"> <property name="title" translatable="yes">Location</property>
<lookup name="metadata">LpPropertiesView</lookup> <property name="activatable-widget">location_button</property>
</lookup> <binding name="subtitle">
</closure> <lookup name="location">
</binding> <lookup name="metadata">LpPropertiesView</lookup>
<style> </lookup>
<class name="property"/> </binding>
</style> <binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="location">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<child type="suffix">
<object class="GtkButton" id="location_button">
<property name="valign">center</property>
<property name="action-name">properties.open-location</property>
<property name="icon-name">mark-location-symbolic</property>
<property name="tooltip-text" translatable="yes">Open Location</property>
<style>
<class name="flat"/>
</style>
</object>
</child>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Originally Created</property>
<binding name="subtitle">
<lookup name="originally-created">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="originally-created">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Aperture</property>
<binding name="subtitle">
<lookup name="f-number">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="f-number">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Exposure</property>
<binding name="subtitle">
<lookup name="exposure-time">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="exposure-time">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">ISO</property>
<binding name="subtitle">
<lookup name="iso">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="iso">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Focal Length</property>
<binding name="subtitle">
<lookup name="focal-length">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="focal-length">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Maker, Model</property>
<binding name="subtitle">
<lookup name="maker-model">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="maker-model">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
</object> </object>
</child> </child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Exposure</property>
<binding name="subtitle">
<lookup name="exposure-time">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="exposure-time">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">ISO</property>
<binding name="subtitle">
<lookup name="iso">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="iso">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Focal Length</property>
<binding name="subtitle">
<lookup name="focal-length">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="focal-length">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Maker, Model</property>
<binding name="subtitle">
<lookup name="maker-model">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</binding>
<binding name="visible">
<closure type="gboolean" function="has_content">
<lookup name="maker-model">
<lookup name="metadata">LpPropertiesView</lookup>
</lookup>
</closure>
</binding>
<style>
<class name="property"/>
</style>
</object>
</child>-->
</object> </object>
</child> </property>
</object> </object>
</property> </property>
</template> </template>