[gtk/matthiasc/for-master: 18/18] Add a reftest for flipping transforms




commit 4359af996f6cb6fb37cf80ef74dc2126a46c8c50
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Sep 28 20:32:27 2020 -0400

    Add a reftest for flipping transforms
    
    Verify that a scale of -1 does in fact cause a
    gradient to go the other direction.

 testsuite/reftests/gradient-flip.css    | 14 ++++++++++++++
 testsuite/reftests/gradient-flip.ref.ui |  9 +++++++++
 testsuite/reftests/gradient-flip.ui     | 20 ++++++++++++++++++++
 3 files changed, 43 insertions(+)
---
diff --git a/testsuite/reftests/gradient-flip.css b/testsuite/reftests/gradient-flip.css
new file mode 100644
index 0000000000..a949e7d141
--- /dev/null
+++ b/testsuite/reftests/gradient-flip.css
@@ -0,0 +1,14 @@
+@import "reset-to-defaults.css";
+
+#reference {
+  background: linear-gradient(to bottom, red, yellow);
+}
+
+window {
+  background: green;
+}
+
+#box1 {
+  transform: scaleY(-1);
+  background: linear-gradient(to bottom, yellow, red);
+}
diff --git a/testsuite/reftests/gradient-flip.ref.ui b/testsuite/reftests/gradient-flip.ref.ui
new file mode 100644
index 0000000000..d7ae2bcfa1
--- /dev/null
+++ b/testsuite/reftests/gradient-flip.ref.ui
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow" id="window1">
+    <property name="decorated">0</property>
+    <property name="default_width">200</property>
+    <property name="default_height">200</property>
+    <property name="name">reference</property>
+  </object>
+</interface>
diff --git a/testsuite/reftests/gradient-flip.ui b/testsuite/reftests/gradient-flip.ui
new file mode 100644
index 0000000000..84e73c60f4
--- /dev/null
+++ b/testsuite/reftests/gradient-flip.ui
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow" id="window1">
+    <property name="decorated">0</property>
+    <property name="default_width">200</property>
+    <property name="default_height">200</property>
+    <child>
+      <object class="GtkBox">
+        <property name="name">box1</property>
+        <child>
+          <object class="GtkBox">
+            <property name="name">box2</property>
+            <property name="hexpand">1</property>
+            <property name="vexpand">1</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


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