Commit Graph

1236 Commits

Author SHA1 Message Date
Timm Bäder
0415574acf testsuite: Add another repeat node test case 2019-08-11 09:05:31 +02:00
Timm Bäder
4c70bf6c9c testsuite: Add a repeat node test case 2019-08-11 09:05:31 +02:00
Mohammed Sadiq
a642883e33 Add builder tests for bind-source without bind-property
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2080
2019-08-10 19:03:37 +05:30
Matthias Clasen
6118dfba74 Add missing includes 2019-07-31 08:04:03 -04:00
Matthias Clasen
e3ee1df456 Add an image comparison utility
This comes in handy sometimes, and we
already have the image diff code.
2019-07-30 14:02:43 -04:00
Matthias Clasen
032473fef8 reftest: Exclude flaky tests
These depend on details of text rendering,
and started failing with newer pango.
2019-07-28 16:42:52 -04:00
Matthias Clasen
8752564fea Remove new attributes from tests
Until we can depend on pango 1.44, these will
fail in ci. Partially reverts f1c7803f80
2019-07-28 11:00:29 -04:00
Matthias Clasen
3fccb16ca6 gsk: Move text-related test out of ci
These are too sensitive to rendering differences
between renderers to run reliably in ci, but we
still want to keep them around. In particular,
the big glyph tests are useful to exercise the
GL glyph cache.
2019-07-28 09:35:37 -04:00
Matthias Clasen
f1c7803f80 label: Parse new pango attributes
Support allow-breaks and show attributes.
These will be in pango 1.44
2019-07-27 00:02:08 -04:00
Matthias Clasen
fd7f6ca7ad tests: improve error handling 2019-07-25 13:51:34 -04:00
Christoph Reiter
9856218073 Merge branch 'tests-no-box-packing' into 'master'
testsuite: Remove dangling references to box-packing tests

See merge request GNOME/gtk!997
2019-07-18 19:32:19 +00:00
Simon McVittie
5cfe9ab603 testsuite: Remove dangling references to box-packing tests
These were removed in commit c47abb5f, before 3.96.0.

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-07-18 09:26:07 +01:00
Timm Bäder
24a4063645 scrollbar: Use a box layout
Makes a lot more sense than the intermediate box just for its layout.
2019-07-15 07:52:42 +02:00
Timm Bäder
b9b5072668 gl renderer: Fix opacity nodes with overlapping child nodes 2019-07-14 10:08:04 +02:00
Matthias Clasen
bda3c6c084 Merge branch 'wip/baedert/for-master' into 'master'
Improve the valgrind experience

See merge request GNOME/gtk!984
2019-07-09 19:39:13 +00:00
Robert Ancell
dbd2a81501 Change the few examples that use a full GTK_ enum value in .ui files.
Lowercase versions work just as well and are much more readable.
2019-07-08 15:52:28 +12:00
Timm Bäder
042f7d117f compare-render: Don't unref an invalid GFile
We already unref it when the g_file_make_directory_with_parents fails.
2019-07-07 07:24:00 +02:00
Matthias Clasen
b2f15a622d Merge branch 'wip/ebassi/constraint-layout' into 'master'
Add constraint-based layout manager

Closes #1090

See merge request GNOME/gtk!973
2019-07-02 14:01:01 +00:00
Benjamin Otte
129691f3a6 flattenlistmodeL: Compute items-changed position properly
The code previously forgot to include the left child of the model's
node. Which of course only happened if that child wasn't NULL, which is
a common case.

Found and test provided by Matthias Clasen.
2019-07-02 02:53:00 +02:00
Emmanuele Bassi
4dd1de4129 Use explicit values for constraint strength
Instead of playing games with mapping negative symbolic values to
positive ones, let's use the appropriate constants everywhere. This
allows us to use:

        GTK_CONSTRAINT_STRENGTH_WEAK * 2

Or

        GTK_CONSTRAINT_STRENGTH_STRONG + 1

In code using the public API.

We also store the strength values as integers, so we can compare them
properly, and only turn them into doubles when they are inserted into
the solver, just like every other variable.
2019-07-01 12:39:24 +01:00
Matthias Clasen
2f97134a08 Amend a constraint solver test
Make the 'repeat edit' test make more than to
suggestions in a single edit phase. It turns out
that this does not work, whereas just doing
two in a row does.
2019-07-01 00:10:11 +01:00
Emmanuele Bassi
6b308cd71e Add constraint solver
GtkConstraintSolver is an implementation of the Cassowary constraint
solving algorithm:

  http://constraints.cs.washington.edu/cassowary/

The Cassowary method allows to incrementally solve a tableau of linear
equations, in the form of:

  x = y × coefficient + constant

with different weights, or strengths, applied to each one.

These equations can be used to describe constraints applied to a layout
of UI elements, which allows layout managers using the Cassowary method
to quickly, and efficiently, lay out widgets in complex relations
between themselves and their parent container.
2019-06-30 23:42:44 +01:00
Matthias Clasen
f6a2678486 Add another grid layout test
This one will be used for comparison
with constraint layouts.
2019-06-28 19:21:21 +00:00
Matthias Clasen
e28ec2a3eb Some more grid layout tests
Add testcases for spanning children and homogeneity.
2019-06-28 18:07:23 +00:00
Matthias Clasen
c4fd786866 Add a test for the grid layout manager
Test some obvious conditions. This is mainly
to test the waters for more intesting tests
with other layout managers later.
2019-06-28 13:30:16 +00:00
Matthias Clasen
b903d8ee33 Add another action test
Test that disabled actions aren't activated.
2019-06-23 01:39:34 +00:00
Matthias Clasen
366e8da927 Add another test for action inheritance
This one checks for precedence between
class actions and inserted groups.
2019-06-22 23:30:22 +00:00
Matthias Clasen
135580108a Add a test for action introspection
This checks that gtk_widget_query_action works.
2019-06-22 23:11:49 +00:00
Matthias Clasen
4515604511 Add another test for action inheritance
Check that overlapping prefixes are handled
correctly.
2019-06-22 23:00:42 +00:00
Matthias Clasen
3ef8af3be9 Add a test for GtkText actions
Check that the class actions are there and work.
2019-06-21 03:58:21 +00:00
Matthias Clasen
fe6507f875 Add a test for gtk_widget_insert_action_group
This tests that action group inheritance
behaves as expected.
2019-06-21 03:58:13 +00:00
Daniel Boles
732630e0e2 testsuite/a11y/about: Fix exp. output per 31066a69
cherry-pick of commit e56a9e6ce5

Close #1949
2019-06-14 18:05:06 +01:00
Matthias Clasen
f63cec30a4 Add a focus-chain test for focusable containers 2019-06-11 17:15:02 +00:00
Matthias Clasen
1d93e38456 testsuite: Be robust against broken focus
When we start cycling on a subset, abort
after a while.
2019-06-11 17:14:42 +00:00
Matthias Clasen
cfebff5dcf testsuite: more focus-chain output
Differentiate between wrapping around and
stopping at the end of the focus chain.

Update the existing tests, and add two
new ones where the difference matters.
2019-06-11 14:56:38 +00:00
Matthias Clasen
436d7cc0d1 Add a focus chain test
Add a test that enumerates the focus chain by
emitting move-focus repeatedly, and compares
the result to expected output.

The test expects a ui file and a reference
file as input. The reference file can be created
using the --generate option.
2019-06-11 10:14:23 -04:00
Benjamin Otte
ec5854bb9b Merge branch 'for-master' into 'master'
testsuite: Make creating the output dir not racy

Closes #1942

See merge request GNOME/gtk!924
2019-06-09 21:35:15 +00:00
Benjamin Otte
062244ab71 testsuite: Make creating the output dir not racy
Fixes #1942
2019-06-09 23:17:10 +02:00
Matthias Clasen
8452b9a13d Expand focus tests 2019-06-09 17:38:54 +00:00
Benjamin Otte
24effe45cc testsuite: Add tests for printing/parsing transforms 2019-06-03 19:12:03 +02:00
Matthias Clasen
2f7047147d gsk: Add some more transform tests
Tests around identity. Seems trivial, but
still managed to find a bug.
2019-06-03 16:20:38 +00:00
Matthias Clasen
0ab4a232b7 Move transform tests to the gsk suite
That is where they belong.
2019-06-03 16:10:09 +00:00
Timm Bäder
05ca772631 GskTransform: Ignore identity transforms
We often end up with e.g. a scale of 1 or a translation by 0/0. Ignore
those transforms since they don't do anything.
2019-06-03 17:03:02 +02:00
Matthias Clasen
3788e1dea7 testsuite: Pass --output for gsk tests
We want to keep the output from ci runs.
So we now write the .out.png and .diff.png
files to build/testsuite/gsk/compare/$RENDERER.
2019-06-03 02:09:04 +00:00
Matthias Clasen
e0bf301d34 gsk tests: Add an --output option
This will be used to save artifacts in ci.
2019-06-03 02:09:04 +00:00
Matthias Clasen
c7387a8e7f gsk: Test huge glyphs
These don't fit in the glyph cache.
2019-06-03 02:08:36 +00:00
Matthias Clasen
1c1d4f32c8 gsk: Test big glyphs
These are big, but still fit in the glyph cache.
Therefore, the test succeeds.
2019-06-03 02:08:36 +00:00
Benjamin Otte
7e9cb07a92 Merge branch 'for-master' into 'master'
For master

See merge request GNOME/gtk!903
2019-06-03 00:22:40 +00:00
Benjamin Otte
5a0c8805fc transform: Coalesce similar transforms
If somebody does a transform like
  scale(5) scale(10) translate(1,1) translate(5,0)
store it instead as
  scale(50) translate(6,1)
This way, less memory is consumed and transforms are easier to read.

In particular, this simplifies the typical transforms we do in GTK,
which are just one translation after another.
2019-06-02 21:18:56 +02:00
Timm Bäder
db548ee2a0 gl renderer: Fix scale computation
We don't need to just look at the scale of the new modelview matrix, but
at the one we get when multiplying the new one with the current one.

Test case attached.
2019-06-02 10:25:39 +02:00