[gtk+/wip/matthiasc/node-dump] Add a css node test for buttons



commit 96ed2894065d36f150541ea6bc59b9c4f4fa1c45
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 28 10:35:58 2015 -0500

    Add a css node test for buttons

 testsuite/css/nodes/Makefile.am   |    5 +-
 testsuite/css/nodes/buttons.nodes |   28 +++++++
 testsuite/css/nodes/buttons.ui    |  147 +++++++++++++++++++++++++++++++++++++
 3 files changed, 178 insertions(+), 2 deletions(-)
---
diff --git a/testsuite/css/nodes/Makefile.am b/testsuite/css/nodes/Makefile.am
index bdf33ea..c2a92f2 100644
--- a/testsuite/css/nodes/Makefile.am
+++ b/testsuite/css/nodes/Makefile.am
@@ -25,8 +25,9 @@ test_css_nodes_SOURCES = \
         test-css-nodes.c
 
 test_data = \
-       entries.ui entries.nodes \
-       notebook.ui notebook.nodes \
+       buttons.ui      buttons.nodes \
+       entries.ui      entries.nodes \
+       notebook.ui     notebook.nodes \
        $(NULL)
 
 EXTRA_DIST += $(test_in_files) $(test_data)
diff --git a/testsuite/css/nodes/buttons.nodes b/testsuite/css/nodes/buttons.nodes
new file mode 100644
index 0000000..d1373ab
--- /dev/null
+++ b/testsuite/css/nodes/buttons.nodes
@@ -0,0 +1,28 @@
+window visible=0 state=dir-ltr classes=background
+  decoration visible=1 state=dir-ltr
+  grid visible=1 state=dir-ltr classes=horizontal
+    button visible=1 state=dir-ltr|checked classes=text-button,toggle
+      label visible=1 state=dir-ltr
+    checkbutton visible=1 state=dir-ltr classes=text-button
+      check visible=1 state=dir-ltr
+      label visible=1 state=dir-ltr
+    radiobutton visible=1 state=dir-ltr|checked classes=text-button
+      radio visible=1 state=dir-ltr|checked
+      label visible=1 state=dir-ltr
+    radiobutton visible=1 state=dir-ltr classes=text-button
+      radio visible=1 state=dir-ltr
+      label visible=1 state=dir-ltr
+    switch visible=1 state=active|dir-ltr
+      slider visible=1 classes=slider
+    switch visible=1 state=dir-ltr
+      slider visible=1 classes=slider
+    button visible=1 state=dir-ltr classes=text-button
+      label visible=1 state=dir-ltr
+    button visible=1 state=dir-ltr classes=image-button
+      GtkAlignment visible=1 state=dir-ltr
+        box visible=1 state=dir-ltr classes=horizontal
+          image visible=1 state=dir-ltr
+    button visible=1 state=dir-ltr classes=image-button
+      GtkAlignment visible=1 state=dir-ltr
+        box visible=1 state=dir-ltr classes=horizontal
+          image visible=1 state=dir-ltr
diff --git a/testsuite/css/nodes/buttons.ui b/testsuite/css/nodes/buttons.ui
new file mode 100644
index 0000000..2489f60
--- /dev/null
+++ b/testsuite/css/nodes/buttons.ui
@@ -0,0 +1,147 @@
+<?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>
+        <child>
+          <object class="GtkToggleButton" id="button1">
+            <property name="label" translatable="yes">Hello World!</property>
+            <property name="visible">True</property>
+            <property name="active">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="button2">
+            <property name="label" translatable="yes">Hello World!</property>
+            <property name="visible">True</property>
+            <property name="active">False</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="button3">
+            <property name="label" translatable="yes">Hello World!</property>
+            <property name="visible">True</property>
+            <property name="active">False</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="button4">
+            <property name="label" translatable="yes">Hello World!</property>
+            <property name="visible">True</property>
+            <property name="active">True</property>
+            <property name="group">button3</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSwitch" id="button5">
+            <property name="visible">True</property>
+            <property name="active">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">4</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSwitch" id="button6">
+            <property name="visible">True</property>
+            <property name="active">False</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <child internal-child="accessible">
+              <object class="AtkObject" id="button6-accessible">
+                <property name="accessible-name">Test switch</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">5</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+
+        <child>
+          <object class="GtkButton" id="button7">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="label">Text Button</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button8">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="image">image8</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button9">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <property name="image">image9</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkImage" id="image8">
+    <property name="visible">True</property>
+    <property name="icon-name">edit-find-replace</property>
+    <property name="icon-size">1</property>
+  </object>
+  <object class="GtkImage" id="image9">
+    <property name="visible">True</property>
+    <property name="icon-name">window-close-symbolic</property>
+    <property name="use-fallback">True</property>
+    <property name="icon-size">1</property>
+  </object>
+</interface>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]