diff options
author | Benjamin Otte <otte@redhat.com> | 2021-12-13 14:49:39 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2021-12-13 14:49:39 +0100 |
commit | 5face79cd06fb0afe20505ed2521db9e6c52e894 (patch) | |
tree | 97b4b602fec95163302a6fb7ebd9858fe4ab8631 /testsuite | |
parent | f609d9cd594bb106b2f4afcf2f1e64f77adbec15 (diff) | |
download | gtk+-5face79cd06fb0afe20505ed2521db9e6c52e894.tar.gz |
label: word-char wrapping should word-wrap for natural size
Testcase added
Fixes #4535
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/reftests/label-wrap-word-char-natural-size.ref.ui | 24 | ||||
-rw-r--r-- | testsuite/reftests/label-wrap-word-char-natural-size.ui | 26 | ||||
-rw-r--r-- | testsuite/reftests/meson.build | 2 |
3 files changed, 52 insertions, 0 deletions
diff --git a/testsuite/reftests/label-wrap-word-char-natural-size.ref.ui b/testsuite/reftests/label-wrap-word-char-natural-size.ref.ui new file mode 100644 index 0000000000..b8a08efc62 --- /dev/null +++ b/testsuite/reftests/label-wrap-word-char-natural-size.ref.ui @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <object class="GtkWindow"> + <property name="default-width">300</property> + <property name="default-height">300</property> + <child> + <object class="GtkBox"> + <property name="halign">center</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel"> + <property name="label">two +lines</property> + </object> + </child> + <child> + <object class="GtkLabel"> + <property name="label">unwrapped</property> + </object> + </child> + </object> + </child> + </object> +</interface> diff --git a/testsuite/reftests/label-wrap-word-char-natural-size.ui b/testsuite/reftests/label-wrap-word-char-natural-size.ui new file mode 100644 index 0000000000..929e5a3089 --- /dev/null +++ b/testsuite/reftests/label-wrap-word-char-natural-size.ui @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <object class="GtkWindow"> + <property name="default-width">300</property> + <property name="default-height">300</property> + <child> + <object class="GtkBox"> + <property name="halign">center</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel"> + <property name="label">two +lines</property> + </object> + </child> + <child> + <object class="GtkLabel"> + <property name="label">unwrapped</property> + <property name="wrap">1</property> + <property name="wrap-mode">word-char</property> + </object> + </child> + </object> + </child> + </object> +</interface> diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build index 587fa252ac..0b6d0fa84a 100644 --- a/testsuite/reftests/meson.build +++ b/testsuite/reftests/meson.build @@ -412,6 +412,8 @@ testdata = [ 'label-width-chars-dont-shrink.ui', 'label-wrap-width-chars.ref.ui', 'label-wrap-width-chars.ui', + 'label-wrap-word-char-natural-size.ref.ui', + 'label-wrap-word-char-natural-size.ui', 'label-wrapped-huge-max-width-chars.ref.ui', 'label-wrapped-huge-max-width-chars.ui', # this seems to make assumptions on text positioning |