Use that instead of hacks to guess when an image is considered invalid
according to https://drafts.csswg.org/css-images-4/#invalid-image
Also add a GtkCssImageInvalid that implements the behavior of invalid
images according to the CSS spec so thjat image implementations can
refer to that image.
This makes demos be compiled/linked before tests. And that means that
while hacking, I can already run widget-factory when the tests are
still linking.
This is in preparation for accepting the image type paintable.
It's a bit incovenient because we need more code to track width/height
ourselves (as the paintable no longer does it for us), but it's not too
hard.
GtkIconHelper does not track invalidations on the paintable.
This is a neat trick to get around the circularity between GDK, GSK and
GTK that we inherit with the GdkPaintable interface.
GdkPaintable uses GtkSnapshot
GtkSnapshot creates GskRenderNodes
GskRenderNodes use GdkTextures
GdkTexture will soon implement GdkPaintable
This causes a loop that spans GDK, GSK and GTK and this is the easiest
way to resolve it without breaking bindings (at least that's the idea).
This adds a new GtkStyleAnimation called GtkCssDynamic (for lack of a
better name) that is spawned whenever at least one dynamic value is part
of the GtkCssStyle.
Nobody's doing that. And CSS Images are no longer using Cairo anyway.
If we wanted to support querying them (hint: we don't) we should be
using GdkPaintable.
The GitLab cache is kept across jobs, whether they succeeded or not:
this means that if a compiler check fails during the Meson
configuration, the small compiler program gets cached and restored the
next time the job is run, thus failing again.
the -gtk-scaled() change in the previous commit makes it so
that we now print out the scale factors. Update the expected
output of affected tests to take that into account.
We slightly expand the syntax of -gtk-scaled to allow
specifying an explicit scale after each image, and then
we create a single-image GtkCssImageScaled with the
preferred scale in compute().
And then clip the texture using the current (maybe also rounded) clip.
This way, the result is correct. We don't necessarily have to do the
offscreen drawing in any case, but got the safe route for now.
Realization is done as a side effect of calling
_gtk_entry_completion_resize_popup(), but if this is done before the
GdkScreen of the GtkWindow is set up correctly, it may result in the
widget being unrealized when the screen is updated. This may happen
when the file dialog parent window is not using the default GdkDisplay.
To avoid this issue, realize the popup after the screen has been
properly set up.
Fixes#83 in gtk4