diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-06-07 11:05:50 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-06-07 11:05:50 -0400 |
commit | d4224cd325932674cb55c8541165c40b0c052af6 (patch) | |
tree | 89402b6714f556ec4541ff3ccd3a51bfce6dd0dd /tests | |
parent | eb76287995fecbb4bef991d29066549570a48164 (diff) | |
download | gtk+-d4224cd325932674cb55c8541165c40b0c052af6.tar.gz |
GtkGrid: Fix a size allocation problem
We need pay attention the the request mode when doing size allocation.
The code was using request mode for requisition, but orientation
for allocation.
Also add a reftest that exhibits the issue, courtesy of
Benjamin Otte.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/reftests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/reftests/grid-wfh.ref.ui | 40 | ||||
-rw-r--r-- | tests/reftests/grid-wfh.ui | 41 |
3 files changed, 83 insertions, 0 deletions
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am index 761d29490d..18fead95f4 100644 --- a/tests/reftests/Makefile.am +++ b/tests/reftests/Makefile.am @@ -69,6 +69,8 @@ EXTRA_DIST += \ grid-expand.css \ grid-expand.ref.ui \ grid-expand.ui \ + grid-wfh.ui \ + grid-wfh.ref.ui \ grid-homogeneous.css \ grid-homogeneous.ref.ui \ grid-homogeneous.ui \ diff --git a/tests/reftests/grid-wfh.ref.ui b/tests/reftests/grid-wfh.ref.ui new file mode 100644 index 0000000000..f01a7d7ea0 --- /dev/null +++ b/tests/reftests/grid-wfh.ref.ui @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkWindow" id="window1"> + <property name="can_focus">False</property> + <property name="type">popup</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">GNOME is awesome!</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="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">GNOME is awesome!</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> +</interface> diff --git a/tests/reftests/grid-wfh.ui b/tests/reftests/grid-wfh.ui new file mode 100644 index 0000000000..8b252eabe9 --- /dev/null +++ b/tests/reftests/grid-wfh.ui @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkWindow" id="window1"> + <property name="can_focus">False</property> + <property name="type">popup</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">GNOME is awesome!</property> + <property name="wrap">True</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="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">GNOME is awesome!</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> +</interface> |