gtk_widget_set_visible and gtk_window_present
are better alternatives, and calling gtk_widget_show
on newly created widgets is no longer necessary
anyway.
There is a widespread need to access the CSS foreground
color for custom drawing in snapshot functions, so make
it available after gtk_style_context_get_color was
deprecated with a new widget api.
The notable exception here are the global provider apis,
which are needed in some form and don't have a replacement
yet. Move them to gtkstyleprovider.[hc], so we can wholly
deprecated gtkstylecontext.[hc].
It doesn't require one generally anyway, because only the root can
change scale and when that happens the root will queue a redraw.
But even if the root doesn't queue a redraw, render nodes (the only
thing discarded by queue_draw()) are scale-independant.
Those property features don't seem to be in use anywhere.
They are redundant since the docs cover the same information
and more. They also created unnecessary translation work.
Closes#4904
If halign=fill, force adjustment to height-for-width.
If valign=fill, force adjustment to width-for-height.
Otherwise look at request mode.
This way we don't try to adapt the filled dimension and only adjust
the one that is not set to fill.
The sequence should be cancelled from the gesture despite its current state.
Also, there was a piece of pointer emulation that was not dropped here,
maybe breaking things further for the pointer emulated touchpoint.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4387
Non-root widgets should unrealize their ATContext, if they have one,
when they are unrooted, as they don't have a connection to a top level
any more.
Fixes: #4421
This fixes fallout from 3742fabae0 where
we would no longer allocate widgets to their natural size when
align flags where used.
GtkPicture wants to be allocated at 100% in that case, so a picture with
a 100x100 image inside a 200x200 window should be allocated 100x100.
The new adjustment code now does the following (for width-for-height
instead of height-for-width, swap width and height in the following):
1. query the minimum width for the allocated height
2. query the natural width
3. compute the maximum of (1) and (2)
4. set the widget width to the minimum of (3) and the allocated
width.
5. compute the natural height for (4)
6. set the widget height to the minimum of (5) and the allocated height.
When adjusting allocations, don't query height for the current width,
but query it for the adjusted width.
And adjust width not to the width-for-any-height, but to
width-for-allocated-height.
This lets people switch back to font rendering that is closer
to what GTK 3 does. It is not perfect - subpixel antialiasing
is not going to work. But it give us an Escape hatch while
we shake out the bugs in our linear layout.
Related: #3787
Look who changed his mind since commit 8e2ffb3b46 :-)
The "call" scope means that the callback is only used during the
function call itself (here: gtk_widget_class_install_action()).
That's clearly wrong here, as the callback is invoked every time
the action is activated.
Arguably the "notified" scope is a better match here, where the
lack of a GDestroyNotify parameter suggests that the callback may
be used forever (which is the case here).
Related: #3498