Hello. I’m experiencing a height rendering problem with a GtkListView inside an AdwClamp within a GtkScrolledWindow. The clamp seems to be interfering with the listview’s height calculation based on the viewport width.
My setup looks like this:
<child>
<object class="GtkScrolledWindow" id="preview_scroller">
<property name="hexpand">true</property>
<property name="vexpand">true</property>
<child>
<object class="AdwClamp">
<property name="maximum-size">890</property>
<property name="tightening-threshold">560</property>
<property name="vexpand">true</property>
<child>
<object class="GtkListView" id="preview_list">
<property name="hexpand">true</property>
<property name="vexpand">true</property>
<style>
<class name="preview_pane_inner"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
The problem is that while the listview items are properly constrained to the width of the viewport, the overall listview height is rendering incorrectly:
- When the pane and the listview items are narrow, the listview is too tall, leaving empty space at the bottom
- When the pane and the listview items are wide, the listview is not tall enough, making it impossible to scroll to the end of the list
Screenshots attached below showing both cases (both are scrolled to the bottom of the viewport even though the scrollbars have automatically hidden).
This issue doesn’t happen when I don’t use the AdwClamp and let the listview items stretch to fill the entirety of the available viewport. In that case, the listview height renders correctly.
What’s the correct way to structure this hierarchy to have the clamp control the width while allowing the scrolled window to properly handle the height? Am I missing a property or using the wrong widget order?
Thanks for any help!

