The logic for this in 3 got lost in the move from gadgets to widgets. We
must update the sensitivities when :wrap, :value, or the bounds change.
Close: https://gitlab.gnome.org/GNOME/gtk/issues/88
This used to test that "windowed widgets" and "non-windowed widgets"
handle alpha correctly, but none of the mentioned widgets are windowed
at all anymore. For the rest, this is more easily and dynamically
testable by simply using the inspector.
If @menu_label == NULL, we create a default page->menu_label. This took
@tab_label.get_label() and passed that to page->menu_label.set_text().
This is wrong because we set the plain text of the menu_label from the
rich text of @tab_label. So, if @tab_label used mnemonics or markup, our
menu_label got the raw underline or markup tags shown in it as raw text.
As we call set_text() on the menu Label, the fix is to be symmetric: use
@tab_label’s get_text() as source, as that strips underlines and markup.
It’s not worth making the default Label ‘inherit’ :use-underline/markup;
that’s a slippery slope, and users wanting such things can just create a
fully fledged GtkLabel to pass as @menu_label to suppress the default.
https://bugzilla.gnome.org/show_bug.cgi?id=705509
That's kinda weird but allows us to delete the texture case from
GtkIconHelper and GTK_IMAGE_TEXTURE from the GtkImageType enum.
And it doesn't cause any other problems because the cell renderer
can't deal with paintables - otherwise it would mirror GtkImage and have
a "paintable" property instead.
If set, the image will draw its contents while keeping their aspect
ratio. That means empty areas show up on the top/bottom or left/right.
Also move the special-case snapshotting code for icons to
GtkIconHelper. That's where it belongs.
This only implements the vfuncs, but does not actually emit signals
yet.
It's also not useed for anything other than snapshot() so far, this
will come in later commits.
... instead of going via surfaces.
A side effect is that the pixbuf property is no longer readable because
we have no good way to get the pixbuf back out of the texture, but I
don't think this matters a lot.
If people want to read the pixbuf property, we need to add some code to
make that work.
Instead of loading them into surfaces (which we want to get rid of), we
load into textures.
In fact, we introduce a new paintable subclass called a GtkScaler that
takes care of tracking scaling.
This also ideally gets rid of an extra conversion once renderers learn
to render textures directly.
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).