More box<>grid comparison tests

Add a more complicated case with multiple expanding children.
Also, make the window a popup.
This commit is contained in:
Matthias Clasen 2011-05-05 16:15:59 -04:00
parent 703af0fb48
commit ebc325d38c
2 changed files with 196 additions and 2 deletions

View File

@ -2,8 +2,9 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="type">popup</property>
<property name="can_focus">False</property>
<property name="default_width">200</property>
<property name="default_width">320</property>
<property name="default_height">320</property>
<child>
<object class="GtkBox" id="box1">
@ -337,6 +338,95 @@
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkEventBox" id="eventbox17">
<property name="name">red</property>
<property name="width_request">10</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox18">
<property name="name">green</property>
<property name="width_request">10</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox19">
<property name="name">red</property>
<property name="width_request">20</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox20">
<property name="name">green</property>
<property name="width_request">20</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox21">
<property name="name">red</property>
<property name="width_request">40</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox22">
<property name="name">green</property>
<property name="width_request">40</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
</child>
</object>

View File

@ -2,8 +2,9 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="type">popup</property>
<property name="can_focus">False</property>
<property name="default_width">200</property>
<property name="default_width">320</property>
<property name="default_height">320</property>
<child>
<object class="GtkBox" id="box1">
@ -359,6 +360,109 @@
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkEventBox" id="eventbox17">
<property name="name">red</property>
<property name="width_request">10</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox18">
<property name="name">green</property>
<property name="width_request">10</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox19">
<property name="name">red</property>
<property name="width_request">20</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox20">
<property name="name">green</property>
<property name="width_request">20</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox21">
<property name="name">red</property>
<property name="width_request">40</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="eventbox22">
<property name="name">green</property>
<property name="width_request">40</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
</child>
</object>