[gtk/wip/otte/inscription: 2/5] reftests: Add inscription reftest for xalign




commit cf946c87f2550cecd2282a986385fa725202d1a2
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jun 13 01:26:20 2022 +0200

    reftests: Add inscription reftest for xalign
    
    Compare with labels again.

 testsuite/reftests/inscription-xalign.ref.ui | 42 ++++++++++++++++++++++++++++
 testsuite/reftests/inscription-xalign.ui     | 39 ++++++++++++++++++++++++++
 testsuite/reftests/meson.build               |  2 ++
 3 files changed, 83 insertions(+)
---
diff --git a/testsuite/reftests/inscription-xalign.ref.ui b/testsuite/reftests/inscription-xalign.ref.ui
new file mode 100644
index 0000000000..08a8ec524b
--- /dev/null
+++ b/testsuite/reftests/inscription-xalign.ref.ui
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="default-width">200</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkBox">
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkLabel">
+            <property name="label" translatable="yes">align
+0.0</property>
+            <property name="wrap-mode">word</property>
+            <property name="wrap">1</property>
+            <property name="xalign">0</property>
+            <property name="justify">left</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <property name="label" translatable="yes">align
+0.5</property>
+            <property name="wrap-mode">word</property>
+            <property name="wrap">1</property>
+            <property name="xalign">0.5</property>
+            <property name="justify">center</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <property name="label" translatable="yes">align
+1.0</property>
+            <property name="wrap-mode">word</property>
+            <property name="wrap">1</property>
+            <property name="xalign">1</property>
+            <property name="justify">right</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/inscription-xalign.ui b/testsuite/reftests/inscription-xalign.ui
new file mode 100644
index 0000000000..d5ae41f3f5
--- /dev/null
+++ b/testsuite/reftests/inscription-xalign.ui
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="default-width">200</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkBox">
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">align
+0.0</property>
+            <property name="wrap-mode">word</property>
+            <property name="min-lines">2</property>
+            <property name="xalign">0</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">align
+0.5</property>
+            <property name="wrap-mode">word</property>
+            <property name="min-lines">2</property>
+            <property name="xalign">0.5</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">align
+1.0</property>
+            <property name="wrap-mode">word</property>
+            <property name="min-lines">2</property>
+            <property name="xalign">1</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
index eecb7f91ad..a3b3219a7b 100644
--- a/testsuite/reftests/meson.build
+++ b/testsuite/reftests/meson.build
@@ -373,6 +373,8 @@ testdata = [
   'inscription-overflow.ui',
   'inscription-overflow-multiline.ref.ui',
   'inscription-overflow-multiline.ui',
+  'inscription-overflow-xalign.ref.ui',
+  'inscription-overflow-xalign.ui',
   'inscription-overflow-yalign.ref.ui',
   'inscription-overflow-yalign.ui',
   'label-attribute-preference.css',


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