testsuite: Add tests for label overdraw

This brings back a subset of what quit-mnemonic.ui tested for, but
trying a lot harder to trigger the label overdrawing its allocation,
which will cause the text to be cut off when clipping is happening.

It should not be an issue at all with GTK4, but keeping that test around
is a good idea.
This commit is contained in:
Benjamin Otte 2022-05-16 22:26:09 +02:00
parent fd21df7244
commit ffd3801b1d
5 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="width-request">100</property>
<child>
<object class="GtkLabel">
<property name="label">letter is off</property>
<property name="xalign">0</property>
<attributes>
<attribute name="style" value="italic" start="0" end="-1"></attribute>
</attributes>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="width-request">100</property>
<child>
<object class="GtkLabel">
<property name="label">letter is off</property>
<property name="halign">start</property>
<property name="xalign">0</property>
<attributes>
<attribute name="style" value="italic" start="0" end="-1"></attribute>
</attributes>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="height-request">100</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">T̰̰̰hree tildes below
</property>
<property name="valign">start</property>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="height-request">100</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">T̰̰̰hree tildes below</property>
<property name="valign">start</property>
</object>
</child>
</object>
</interface>

View File

@ -392,6 +392,10 @@ testdata = [
'label-huge-max-width-chars.ui',
'label-max-width-chars-and-halign-and-infinite-width.ui',
'label-max-width-chars-and-halign-and-infinite-width.ref.ui',
'label-overdraw-horizontal.ref.ui',
'label-overdraw-horizontal.ui',
'label-overdraw-vertical.ref.ui',
'label-overdraw-vertical.ui',
'label-shadows.css',
'label-shadows.ref.ui',
'label-shadows.ui',