[gtk/wip/otte/center-center-center: 1/3] reftests: Add a test for label sizing




commit 0820a7757148d2e1eb585107865a3621241bc788
Author: Benjamin Otte <otte redhat com>
Date:   Wed Oct 20 22:23:25 2021 +0200

    reftests: Add a test for label sizing

 testsuite/reftests/center-center-long-label.ref.ui | 13 +++++++++++++
 testsuite/reftests/center-center-long-label.ui     | 17 +++++++++++++++++
 testsuite/reftests/meson.build                     |  2 ++
 3 files changed, 32 insertions(+)
---
diff --git a/testsuite/reftests/center-center-long-label.ref.ui 
b/testsuite/reftests/center-center-long-label.ref.ui
new file mode 100644
index 0000000000..bac4354c2a
--- /dev/null
+++ b/testsuite/reftests/center-center-long-label.ref.ui
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">1000</property>
+    <property name="height_request">500</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkLabel">
+        <property name="label">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
tempor incididunt ut labore et dolore magna aliqua.</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/center-center-long-label.ui b/testsuite/reftests/center-center-long-label.ui
new file mode 100644
index 0000000000..3dcc480415
--- /dev/null
+++ b/testsuite/reftests/center-center-long-label.ui
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="width_request">1000</property>
+    <property name="height_request">500</property>
+    <property name="decorated">0</property>
+    <child>
+      <object class="GtkLabel">
+        <!-- long label, but shorter than 1000px -->
+        <property name="label">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
tempor incididunt ut labore et dolore magna aliqua.</property>
+        <property name="wrap">1</property>
+        <property name="halign">center</property>
+        <property name="valign">center</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
index 4a84e1de72..418ed2abf1 100644
--- a/testsuite/reftests/meson.build
+++ b/testsuite/reftests/meson.build
@@ -170,6 +170,8 @@ testdata = [
   'box-shadow-with-blend-mode.ui',
   'button-wrapping.ui',
   'button-wrapping.ref.ui',
+  'center-center-long-label.ui',
+  'center-center-long-label.ref.ui',
   'centerlayout-invisible-child.css',
   'centerlayout-invisible-child.ref.ui',
   'centerlayout-invisible-child.ui',


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