[gtk/fix-reftests: 2/2] testsuite: Fix label-shadows test
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-reftests: 2/2] testsuite: Fix label-shadows test
- Date: Fri, 12 Apr 2019 23:33:32 +0000 (UTC)
commit e0730bc118878457264541205d4aed0aebd102ad
Author: Benjamin Otte <otte redhat com>
Date: Sat Apr 13 01:31:49 2019 +0200
testsuite: Fix label-shadows test
Use a GtkFixed to position and rotate the labels. This is necessary
because the GtkLabel::angle property was removed.
testsuite/reftests/label-shadows.ref.ui | 210 +++++++++++++++-----------------
testsuite/reftests/label-shadows.ui | 65 +++-------
testsuite/reftests/meson.build | 1 -
3 files changed, 120 insertions(+), 156 deletions(-)
---
diff --git a/testsuite/reftests/label-shadows.ref.ui b/testsuite/reftests/label-shadows.ref.ui
index e4f582acfd..4761ff9ec2 100644
--- a/testsuite/reftests/label-shadows.ref.ui
+++ b/testsuite/reftests/label-shadows.ref.ui
@@ -1,135 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <object class="GtkWindow" id="window1">
+ <object class="GtkWindow">
<property name="type">popup</property>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkFixed">
+ <property name="width-request">200</property>
+ <property name="height-request">200</property>
<child>
- <object class="GtkFixed" id="fixed1">
- <child>
- <object class="GtkLabel" id="shadow1">
- <property name="label" translatable="yes">ABC</property>
- <attributes>
- <attribute name="foreground" value="#ffff00000000"></attribute>
- </attributes>
- <style>
- <class name="no-shadow"/>
- </style>
- <layout>
- <property name="position">translate(2, 2)</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="label" translatable="yes">ABC</property>
- <style>
- <class name="no-shadow"/>
- </style>
- </object>
- </child>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
+ <property name="label" translatable="yes">ABC</property>
<layout>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="column-span">1</property>
- <property name="row-span">1</property>
+ <property name="position">translate(50, 50) rotate(0) translate(-49,-49)</property>
</layout>
+ <attributes>
+ <attribute name="foreground" value="#ffff00000000"></attribute>
+ </attributes>
+ <style>
+ <class name="no-shadow"/>
+ </style>
</object>
</child>
<child>
- <object class="GtkFixed" id="fixed2">
- <child>
- <object class="GtkLabel" id="shadow2">
- <property name="label" translatable="yes">ABC</property>
- <attributes>
- <attribute name="foreground" value="#ffff00000000"></attribute>
- </attributes>
- <style>
- <class name="no-shadow"/>
- </style>
- <layout>
- <property name="position">translate(2, 0)</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="label" translatable="yes">ABC</property>
- <style>
- <class name="no-shadow"/>
- </style>
- </object>
- </child>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
+ <property name="label" translatable="yes">ABC</property>
<layout>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="column-span">1</property>
- <property name="row-span">1</property>
+ <property name="position">translate(50, 50) rotate(0) translate(-50,-50)</property>
</layout>
+ <style>
+ <class name="no-shadow"/>
+ </style>
</object>
</child>
<child>
- <object class="GtkFixed" id="fixed3">
- <child>
- <object class="GtkLabel" id="shadow3">
- <property name="label" translatable="yes">ABC</property>
- <attributes>
- <attribute name="foreground" value="#ffff00000000"></attribute>
- </attributes>
- <style>
- <class name="no-shadow"/>
- </style>
- <layout>
- <property name="position">translate(0, 0)</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="label" translatable="yes">ABC</property>
- <style>
- <class name="no-shadow"/>
- </style>
- </object>
- </child>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
+ <property name="label" translatable="yes">ABC</property>
<layout>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="column-span">1</property>
- <property name="row-span">1</property>
+ <property name="position">translate(150, 50) rotate(90) translate(-49,-49)</property>
</layout>
+ <attributes>
+ <attribute name="foreground" value="#ffff00000000"></attribute>
+ </attributes>
+ <style>
+ <class name="no-shadow"/>
+ </style>
</object>
</child>
<child>
- <object class="GtkFixed" id="fixed4">
- <child>
- <object class="GtkLabel" id="shadow4">
- <property name="label" translatable="yes">ABC</property>
- <attributes>
- <attribute name="foreground" value="#ffff00000000"></attribute>
- </attributes>
- <style>
- <class name="no-shadow"/>
- </style>
- <layout>
- <property name="position">translate(0, 2)</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="label" translatable="yes">ABC</property>
- <style>
- <class name="no-shadow"/>
- </style>
- </object>
- </child>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
+ <property name="label" translatable="yes">ABC</property>
<layout>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="column-span">1</property>
- <property name="row-span">1</property>
+ <property name="position">translate(150, 50) rotate(90) translate(-50,-50)</property>
</layout>
+ <style>
+ <class name="no-shadow"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
+ <property name="label" translatable="yes">ABC</property>
+ <layout>
+ <property name="position">translate(150, 150) rotate(180) translate(-49,-49)</property>
+ </layout>
+ <attributes>
+ <attribute name="foreground" value="#ffff00000000"></attribute>
+ </attributes>
+ <style>
+ <class name="no-shadow"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
+ <property name="label" translatable="yes">ABC</property>
+ <layout>
+ <property name="position">translate(150, 150) rotate(180) translate(-50,-50)</property>
+ </layout>
+ <style>
+ <class name="no-shadow"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
+ <property name="label" translatable="yes">ABC</property>
+ <layout>
+ <property name="position">translate(50, 150) rotate(180) translate(-49,-49)</property>
+ </layout>
+ <attributes>
+ <attribute name="foreground" value="#ffff00000000"></attribute>
+ </attributes>
+ <style>
+ <class name="no-shadow"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
+ <property name="label" translatable="yes">ABC</property>
+ <layout>
+ <property name="position">translate(50, 150) rotate(180) translate(-50,-50)</property>
+ </layout>
+ <style>
+ <class name="no-shadow"/>
+ </style>
</object>
</child>
</object>
diff --git a/testsuite/reftests/label-shadows.ui b/testsuite/reftests/label-shadows.ui
index d3093d6dca..bba30cda1d 100644
--- a/testsuite/reftests/label-shadows.ui
+++ b/testsuite/reftests/label-shadows.ui
@@ -1,76 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <object class="GtkWindow" id="window1">
+ <object class="GtkWindow">
<property name="type">popup</property>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkFixed">
+ <property name="width-request">200</property>
+ <property name="height-request">200</property>
<child>
- <object class="GtkLabel" id="label1">
- <property name="halign">start</property>
- <property name="valign">start</property>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
<property name="label" translatable="yes">ABC</property>
<layout>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="column-span">1</property>
- <property name="row-span">1</property>
+ <property name="position">translate(50, 50) rotate(0) translate(-50,-50)</property>
</layout>
</object>
</child>
<child>
- <object class="GtkLabel" id="label2">
- <property name="halign">start</property>
- <property name="valign">start</property>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
<property name="label" translatable="yes">ABC</property>
<layout>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="column-span">1</property>
- <property name="row-span">1</property>
+ <property name="position">translate(150, 50) rotate(90) translate(-50,-50)</property>
</layout>
</object>
</child>
<child>
- <object class="GtkLabel" id="label3">
- <property name="halign">start</property>
- <property name="valign">start</property>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
<property name="label" translatable="yes">ABC</property>
<layout>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="column-span">1</property>
- <property name="row-span">1</property>
+ <property name="position">translate(150, 150) rotate(180) translate(-50,-50)</property>
</layout>
</object>
</child>
<child>
- <object class="GtkLabel" id="label4">
- <property name="halign">start</property>
- <property name="valign">start</property>
+ <object class="GtkLabel">
+ <property name="width-request">100</property>
+ <property name="height-request">100</property>
<property name="label" translatable="yes">ABC</property>
<layout>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="column-span">1</property>
- <property name="row-span">1</property>
+ <property name="position">translate(50, 150) rotate(180) translate(-50,-50)</property>
</layout>
</object>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
</child>
</object>
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
index 3bafca4fad..998d76349d 100644
--- a/testsuite/reftests/meson.build
+++ b/testsuite/reftests/meson.build
@@ -417,7 +417,6 @@ xfails = [
'background-origin.ui',
'border-half-pixel.ui',
'border-image-url.ui',
- 'label-shadows.ui',
'sizegroups-evolution-identity-page.ui',
'textview-border-windows.ui',
'window-show-contents-on-map.ui',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]