[gtk/wip/otte/inscription: 2/3] reftests: Test overflowing inscription yalign




commit 4809efd6300d9e447758d6ab929863e40e451933
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jun 11 22:15:43 2022 +0200

    reftests: Test overflowing inscription yalign
    
    Overflowing inscriptions should always align to the top, even when half
    an extra line is available.

 .../reftests/inscription-overflow-yalign.ref.ui    | 49 ++++++++++++++++++++++
 testsuite/reftests/inscription-overflow-yalign.ui  | 45 ++++++++++++++++++++
 testsuite/reftests/meson.build                     |  2 +
 3 files changed, 96 insertions(+)
---
diff --git a/testsuite/reftests/inscription-overflow-yalign.ref.ui 
b/testsuite/reftests/inscription-overflow-yalign.ref.ui
new file mode 100644
index 0000000000..448a949f37
--- /dev/null
+++ b/testsuite/reftests/inscription-overflow-yalign.ref.ui
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="default-width">200</property>
+    <child>
+      <object class="GtkBox">
+        <property name="orientation">vertical</property>
+        <property name="homogeneous">1</property>
+        <child>
+          <object class="GtkLabel">
+            <property name="label" translatable="yes">THIS
+HIGH</property>
+            <attributes>
+              <attribute name="line-height" value="1.25" />
+            </attributes>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua.</property>
+            <property name="text-overflow">clip</property>
+            <property name="yalign">0.0</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua.</property>
+            <property name="text-overflow">ellipsize-start</property>
+            <property name="yalign">0.0</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua.</property>
+            <property name="text-overflow">ellipsize-middle</property>
+            <property name="yalign">0.0</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua.</property>
+            <property name="text-overflow">ellipsize-end</property>
+            <property name="yalign">0.0</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/inscription-overflow-yalign.ui 
b/testsuite/reftests/inscription-overflow-yalign.ui
new file mode 100644
index 0000000000..ee0e92ee9e
--- /dev/null
+++ b/testsuite/reftests/inscription-overflow-yalign.ui
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="default-width">200</property>
+    <child>
+      <object class="GtkBox">
+        <property name="orientation">vertical</property>
+        <property name="homogeneous">1</property>
+        <child>
+          <object class="GtkLabel">
+            <property name="label" translatable="yes">THIS
+HIGH</property>
+            <attributes>
+              <attribute name="line-height" value="1.25" />
+            </attributes>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua.</property>
+            <property name="text-overflow">clip</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua.</property>
+            <property name="text-overflow">ellipsize-start</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua.</property>
+            <property name="text-overflow">ellipsize-middle</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkInscription">
+            <property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua.</property>
+            <property name="text-overflow">ellipsize-end</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
index 7c03cb7062..c59c337297 100644
--- a/testsuite/reftests/meson.build
+++ b/testsuite/reftests/meson.build
@@ -371,6 +371,8 @@ testdata = [
   'inscription-markup.ui',
   'inscription-overflow.ref.ui',
   'inscription-overflow.ui',
+  'inscription-overflow-yalign.ref.ui',
+  'inscription-overflow-yalign.ui',
   'label-attribute-preference.css',
   'label-attribute-preference.ref.ui',
   'label-attribute-preference.ui',


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