-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
upstreamProbably caused by a bug in one of the C libraries wrapped by a packageProbably caused by a bug in one of the C libraries wrapped by a package
Description
I'm not totally sure that's a bug or by design but I write this here for reference.
if you try to get a signal for releasing a click on a scale, it doesn't work :
using Gtk4
c = GtkScale(:h, 0, 1, 0.01)
win = GtkWindow(c, "Scale")
g = GtkGestureClick(c, 0)
signal_connect(g, "released") do controller, n_press, x, y
@info "released"
end
signal_connect(g, "pressed") do controller, n_press, x, y
@info "pressed"
endApparently there was a bug related to this but it should be fixed already in the JLL we use.
https://gitlab.gnome.org/GNOME/gtk/-/issues/4939
Searching a bit I came across this workaround (wrap the scale in a box), that works just fine :
using Gtk4
c = GtkScale(:h,0,1, 0.01)
box = GtkBox(:v)
push!(box,c)
win = GtkWindow(box, "Scale")
g = GtkGestureClick(box, 0)
Gtk4.G_.set_propagation_phase(g, Gtk4.PropagationPhase_CAPTURE)
signal_connect(g, "released") do controller, n_press, x, y
@info "released"
end
signal_connect(g, "pressed") do controller, n_press, x, y
@info "pressed"
endMetadata
Metadata
Assignees
Labels
upstreamProbably caused by a bug in one of the C libraries wrapped by a packageProbably caused by a bug in one of the C libraries wrapped by a package