[gtk+: 12/15] Update background-area reftest for background-clip



commit d8d7c7c17133578d9c4e6aeda97d3b43750177e9
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Nov 24 21:01:16 2011 +0100

    Update background-area reftest for background-clip

 tests/reftests/background-area.css    |   47 +++++++++++++++++++++++++---
 tests/reftests/background-area.ref.ui |   54 ++++++++++++++++++++++++++++----
 tests/reftests/background-area.ui     |   44 +++++++++++++++++++++++----
 3 files changed, 127 insertions(+), 18 deletions(-)
---
diff --git a/tests/reftests/background-area.css b/tests/reftests/background-area.css
index d6b4a09..0cb0094 100644
--- a/tests/reftests/background-area.css
+++ b/tests/reftests/background-area.css
@@ -1,23 +1,60 @@
 * {
   engine: none;
-  border-radius: 0;
   border-style: none;
   border-image: none;
   background-image: none;
+  background-clip: border-box;
+  border-radius: 0;
 }
 
 GtkWindow {
-  background-color: green;
+  background-color: rgb(0,255,0);
 }
 
 GtkButton {
-  background-color: black;
+  border-width: 5;
   border-style: solid;
   border-color: rgba(255,0,0,0.6);
-  border-width: 4;
+  padding: 10;
+  background-color: rgb(0,0,255);
+
+  /* Make sure children of button are only offset by padding */
+  -GtkButton-default-border: 0;
+  -GtkButton-inner-border: 0;
+  -GtkWidget-focus-line-width: 0;
+  -GtkWidget-focus-padding: 0;
+}
+
+#button1 {
+  background-clip: border-box;
+}
+
+#button2 {
+  background-clip: padding-box;
+}
+
+#button3 {
+  background-clip: content-box;
+}
+
+#reference1 {
+  border-color: rgb(153,0,102);
+}
+
+#reference2 {
+  border-color: rgb(153,102,0);
 }
 
-#reference {
+#reference3 {
   border-color: rgb(153,102,0);
+  background-color: none;
+  padding: 5;
+}
+
+#reference3inner {
+  padding: 0;
+  border-width: 10;
+  border-color: rgb(0, 255, 0);
+  background-color: rgb(0,0,255);
 }
 
diff --git a/tests/reftests/background-area.ref.ui b/tests/reftests/background-area.ref.ui
index fe320d3..b9b096c 100644
--- a/tests/reftests/background-area.ref.ui
+++ b/tests/reftests/background-area.ref.ui
@@ -5,14 +5,54 @@
     <property name="can_focus">False</property>
     <property name="type">popup</property>
     <child>
-      <object class="GtkButton" id="button1">
-        <property name="name">reference</property>
-        <property name="label" translatable="yes">Make sure that the background
-area doesn't contain the border.</property>
+      <object class="GtkBox" id="box1">
         <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">5</property>
+        <property name="border-width">5</property>
+        <child>
+	  <object class="GtkButton" id="button1">
+	    <property name="name">reference1</property>
+	    <property name="visible">True</property>
+	    <property name="can_focus">True</property>
+	    <property name="receives_default">True</property>
+	    <property name="use_action_appearance">False</property>
+	    <property name="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button2">
+	    <property name="name">reference2</property>
+	    <property name="visible">True</property>
+	    <property name="can_focus">True</property>
+	    <property name="receives_default">True</property>
+	    <property name="use_action_appearance">False</property>
+	    <property name="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button3">
+	    <property name="name">reference3</property>
+	    <property name="visible">True</property>
+	    <property name="can_focus">True</property>
+	    <property name="receives_default">True</property>
+	    <property name="use_action_appearance">False</property>
+	    <property name="width_request">144</property>
+	    <property name="height_request">70</property>
+	    <child>
+	      <object class="GtkButton" id="button4">
+		<property name="name">reference3inner</property>
+		<property name="visible">True</property>
+		<property name="can_focus">True</property>
+		<property name="receives_default">True</property>
+		<property name="use_action_appearance">False</property>
+	      </object>
+	    </child>
+	  </object>
+	</child>
       </object>
     </child>
   </object>
diff --git a/tests/reftests/background-area.ui b/tests/reftests/background-area.ui
index dea4bae..1fc44e8 100644
--- a/tests/reftests/background-area.ui
+++ b/tests/reftests/background-area.ui
@@ -5,13 +5,45 @@
     <property name="can_focus">False</property>
     <property name="type">popup</property>
     <child>
-      <object class="GtkButton" id="button1">
-        <property name="label" translatable="yes">Make sure that the background
-area doesn't contain the border.</property>
+      <object class="GtkBox" id="box1">
         <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">5</property>
+        <property name="border-width">5</property>
+        <child>
+	  <object class="GtkButton" id="button1">
+	    <property name="name">button1</property>
+	    <property name="visible">True</property>
+	    <property name="can_focus">True</property>
+	    <property name="receives_default">True</property>
+	    <property name="use_action_appearance">False</property>
+	    <property name="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button2">
+	    <property name="name">button2</property>
+	    <property name="visible">True</property>
+	    <property name="can_focus">True</property>
+	    <property name="receives_default">True</property>
+	    <property name="use_action_appearance">False</property>
+	    <property name="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button3">
+	    <property name="name">button3</property>
+	    <property name="visible">True</property>
+	    <property name="can_focus">True</property>
+	    <property name="receives_default">True</property>
+	    <property name="use_action_appearance">False</property>
+	    <property name="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
       </object>
     </child>
   </object>



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