The entire color scale hack is still done in GtkRange, which draws the
color scale in the range gizmo. So, to correctly redraw the color scale
when setting a new color, we need to redraw the proper widget and that's
the trough widget.
Fixes#1453
When drawing onto a recording surface, source surfaces get cached.
But if we g_free() the surface data after we're done, that cache is
gonna point at invalid data...
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.
Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
Instead of making people intiialize a rectangle and then applying border
radius manually, provide a constructor that does it for them.
While doing that, also allow people to instead request the padding box
or the content box.
Refactor all relevant code to use this new constructor.
Mainly doing s/TARGET/BUBBLE/ on the fully ported widgets, but GtkTreeView
where the double click handler has moved to GTK_PHASE_TARGET so it runs
parallelly to the still existing event handlers.
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.
All callers have been updated.
The propagation phase property/methods in GtkEventController are gone,
This is now set directly on the GtkWidget add/remove controller API,
which has been made private.
The only public bit now are the new functions gtk_gesture_attach() and
gtk_gesture_detach() that will use the private API underneath.
All callers have been updated.
Instead of special-casing Adwaita, apply the half-width logic for themes
that have a scale slider with vertical proportions.
Also, simplify the rendering code a bit by factoring out the trough
sizing logic.
Rename get/set_color to get/set_rgba and show_alpha to use_alpha,
to match existing GtkColorButton API and let GtkColorButton implement
GtkColorChooser.
Implement popups in the editor, fix window sizing, fix RTL flipping.
GtkColorPlane is now using adjustments, and GtkColorEditor is using
adjustments as its model as well.