Repository navigation
Conversation
…told#1190) Port of the shared-widget behaviour VectorCraft (storytold#1600) and PhotoCraft (storytold#3521) ship, so the Craft apps behave the same: press a checkbox and drag; the first one toggles and every box the pointer passes over takes the same new state until the button is released. A plain click still toggles exactly one box, and the layers panel's eye/lock columns keep their existing drag. widgets::checkbox now senses drags and returns a CheckResponse whose clicked() also fires when a drag paints the box (it Derefs to the Response, so the 20 call sites are unchanged). Form dialogs' Bool fields use the shared widget, so Preferences and Interpret-Footage-style dialogs drag the same as the panels. Tests: widgets::dragging_across_checkboxes_paints_the_state; the ui-egui lib (258) and the settings/workflow/visual integration suites pass; fmt and clippy -D warnings clean.
Member
|
Thanks @vbasky! On current |
Contributor
Author
|
Main already has drag-to-paint checkboxes on egui 0.37, so I am closing this instead of rebasing it.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1190
Port of the shared-widget behaviour VectorCraft shipped in #1600 (#1477) and PhotoCraft in #3521, so all Craft apps work the same way.
widgets::checkboxgains a drag sense and returns aCheckResponsethat Derefs to the eguiResponse; itsclicked()also fires when a drag paints the box. All ~20 panel call sites (Effect Controls, Timeline switches, Properties, Character/Paragraph, Render Queue, Header, Paint panels) work unchanged and get the behaviour.FieldKind::Boolrows now use the shared widget too, so Preferences-style dialogs drag like the panels. The Layers panel's eye/lock columns already dragged; their code is untouched.Tests
widgets::tests::dragging_across_checkboxes_paints_the_state(sweep down a column, then a plain click).cargo test -p effectcraft-ui-egui --lib258 passed;ui_settings_info(5) andui_workflow_selection(23) integration suites pass; fmt + clippy -D warnings clean.