You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scopes: cleaner exposure change code and bauhaus interactions
Decouple (as much as possible) the exposure change drag/scroll
behavior from bauhaus internals. Within the scopes drawable, use a
GtkGestureDrag to handle drag events. Pass minimal event
information (delta, # of clicks, modifiers) to the handler code in
exposure iop. The exposure handler now uses the regular bauhaus
API (e.g. dt_bauhaus_slider_set()) to adjust slider values.
Dragging within the scopes widget is now much closer to how it is
handled in the colorequal iop. The exception is that this commit
doesn't use gtk_widget_event() to handle scroll events, so as not to
need to rewrite the event to account for changes in scroll direction.
Previously things were much more entangled: On a user interaction, the
scope would pass either an GtkGestureSingle, GtkEventControllerMotion,
or GtkEventControllerScroll to the exposure event handler. That event
handler would then inject the gesture/event directly into the bauhaus
press/release/motion/scroll code.
Separating things out has these benefits:
- Ease update to GTK4 by no longer require that scope, exposure, and
bauhaus use the same event/gesture handling.
- Remove hack to handle exposure changes via scope when the exposure
iop widgets hasn't yet been allocated.
- Acknowledges that the scopes drag regions are a widget with their
own behavior which is different from the behavior of a bauhaus slider.
- Allow for removing the darktable.bauhaus->scroll(), ->press(),
->motion() and ->release() interface which was only used by scopes.
Dragging using speed multiplier modifiers (control/shift) continues to
work. Unlike bauhaus sliders, though, dragging in the scope with speed
multipliers doesn't adjust values in discrete steps, for simplicity of
code.
This commit adds a couple helpers in gtk.h & gtk.c:
- dt_gui_connect_drag(), analog to dt_gui_connect_click()
- dt_gui_deny(gesture), analog to dt_gui_claim()
This commit also:
- fixes a bug which caused all drags to effect the exposure slider,
even when they started in the black point slider region
- removes verbose warning output in split mode when drag from waveform
to vectorscope
- fixes double negation of direction when scrolling black point
- removes the broken behavior by which right clicking in the scopes
widget would open a bauhaus exposure/blackpoint change popup which
was often inaccessible as it was not under the pointer
0 commit comments