gtk2/testsuite/reftests/listview-with-wrapped-labels.ui
Benjamin Otte 577d520006 reftests: Add reftest for last 2 issues
Use a label that is long enough to require wrapping and force it into a
hardcoded width. Use a sentence where all the words have the same size
to not get unwanted wrapping behavior.

Also append a 2nd row to check that the first row gets the proper height
allocated.

Found by Marco Melorio.
2021-11-06 04:30:50 +01:00

60 lines
1.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow" id="window1">
<property name="width_request">150</property>
<property name="height_request">300</property>
<property name="decorated">0</property>
<child>
<object class="GtkScrolledWindow">
<child>
<object class="GtkListView" id="listview">
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GtkListItem">
<property name="child">
<object class="GtkBox">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="xalign">0</property>
<property name="wrap">1</property>
<binding name="label">
<lookup name="string" type="GtkStringObject">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
</object>
</child>
</object>
</child>
</object>
</property>
</template>
</interface>
]]></property>
</object>
</property>
<property name="model">
<object class="GtkNoSelection">
<property name="model">
<object class="GtkStringList">
<items>
<item>Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.</item>
<item>Hello World!</item>
</items>
</object>
</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</interface>