[gtk+] Add some reftests comparing aspects of grid and box spacing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add some reftests comparing aspects of grid and box spacing
- Date: Wed, 11 May 2011 17:48:34 +0000 (UTC)
commit 87e46bfaa93e80f5104d41a6892a5274abbc317f
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 11 13:48:00 2011 -0400
Add some reftests comparing aspects of grid and box spacing
tests/reftests/Makefile.am | 6 +-
tests/reftests/grid-spacing1.ref.ui | 132 +++++++++++++++++++++++++++++++++
tests/reftests/grid-spacing1.ui | 123 +++++++++++++++++++++++++++++++
tests/reftests/grid-spacing2.ref.ui | 129 ++++++++++++++++++++++++++++++++
tests/reftests/grid-spacing2.ui | 139 +++++++++++++++++++++++++++++++++++
5 files changed, 528 insertions(+), 1 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index 7e5ac9f..cf8a661 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -57,4 +57,8 @@ EXTRA_DIST += \
simple.ref.ui \
simple.ui \
toplevel-vs-popup.ref.ui \
- toplevel-vs-popup.ui
+ toplevel-vs-popup.ui \
+ grid-spacing1.ref.ui \
+ grid-spacing1.ui \
+ grid-spacing2.ref.ui \
+ grid-spacing2.ui
diff --git a/tests/reftests/grid-spacing1.ref.ui b/tests/reftests/grid-spacing1.ref.ui
new file mode 100644
index 0000000..ddcb421
--- /dev/null
+++ b/tests/reftests/grid-spacing1.ref.ui
@@ -0,0 +1,132 @@
+<?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="GtkBox" id="box">
+ <property name="orientation">vertical</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <!-- spacing -->
+ <object class="GtkBox" id="box0">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
+ <object class="GtkLabel" id="one">
+ <property name="visible">True</property>
+ <property name="label">One</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="two">
+ <property name="visible">True</property>
+ <property name="label">Two</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="three">
+ <property name="visible">True</property>
+ <property name="label">Three</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <!-- homogeneous -->
+ <object class="GtkBox" id="box1">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">0</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="long">
+ <property name="visible">True</property>
+ <property name="label">Verylongtext</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="short">
+ <property name="visible">True</property>
+ <property name="label">Short</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <!-- expand -->
+ <object class="GtkBox" id="box2">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="a">
+ <property name="visible">True</property>
+ <property name="label">A</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="b">
+ <property name="visible">True</property>
+ <property name="label">B</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="c">
+ <property name="visible">True</property>
+ <property name="label">C</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/tests/reftests/grid-spacing1.ui b/tests/reftests/grid-spacing1.ui
new file mode 100644
index 0000000..a8a330a
--- /dev/null
+++ b/tests/reftests/grid-spacing1.ui
@@ -0,0 +1,123 @@
+<?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="grid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+
+ <child>
+ <object class="GtkGrid" id="grid0">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row-spacing">20</property>
+ <child>
+ <object class="GtkLabel" id="one">
+ <property name="visible">True</property>
+ <property name="label">One</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="two">
+ <property name="visible">True</property>
+ <property name="label">Two</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="three">
+ <property name="visible">True</property>
+ <property name="label">Three</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column-homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="long">
+ <property name="visible">True</property>
+ <property name="label">Verylongtext</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="short">
+ <property name="visible">True</property>
+ <property name="label">Short</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="a">
+ <property name="visible">True</property>
+ <property name="label">A</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="b">
+ <property name="visible">True</property>
+ <property name="label">B</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="c">
+ <property name="visible">True</property>
+ <property name="label">C</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/tests/reftests/grid-spacing2.ref.ui b/tests/reftests/grid-spacing2.ref.ui
new file mode 100644
index 0000000..bb04eaa
--- /dev/null
+++ b/tests/reftests/grid-spacing2.ref.ui
@@ -0,0 +1,129 @@
+<?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="GtkBox" id="box">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <!-- spacing -->
+ <object class="GtkBox" id="box0">
+ <property name="orientation">vertical</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
+ <object class="GtkLabel" id="one">
+ <property name="visible">True</property>
+ <property name="label">One</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="two">
+ <property name="visible">True</property>
+ <property name="label">Two</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="three">
+ <property name="visible">True</property>
+ <property name="label">Three</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+
+ <child>
+ <!-- homogeneous -->
+ <object class="GtkBox" id="box1">
+ <property name="orientation">vertical</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">0</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="long">
+ <property name="visible">True</property>
+ <property name="label">Verylongtext</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="short">
+ <property name="visible">True</property>
+ <property name="label">Short</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+
+ <child>
+ <!-- expand -->
+ <object class="GtkBox" id="box2">
+ <property name="orientation">vertical</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="a">
+ <property name="visible">True</property>
+ <property name="label">A</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="b">
+ <property name="visible">True</property>
+ <property name="label">B</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="c">
+ <property name="visible">True</property>
+ <property name="label">C</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/tests/reftests/grid-spacing2.ui b/tests/reftests/grid-spacing2.ui
new file mode 100644
index 0000000..0e9c82f
--- /dev/null
+++ b/tests/reftests/grid-spacing2.ui
@@ -0,0 +1,139 @@
+<?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="grid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+
+ <child>
+ <object class="GtkGrid" id="grid0">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column-spacing">20</property>
+ <child>
+ <object class="GtkLabel" id="one">
+ <property name="visible">True</property>
+ <property name="label">One</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="two">
+ <property name="visible">True</property>
+ <property name="label">Two</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="three">
+ <property name="visible">True</property>
+ <property name="label">Three</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row-homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="long">
+ <property name="visible">True</property>
+ <property name="label">Verylongtext</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="short">
+ <property name="visible">True</property>
+ <property name="label">Short</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="a">
+ <property name="visible">True</property>
+ <property name="label">A</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="b">
+ <property name="visible">True</property>
+ <property name="label">B</property>
+ <property name="vexpand">True</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="c">
+ <property name="visible">True</property>
+ <property name="label">C</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+
+ </object>
+ </child>
+ </object>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]