refactor: use custom component for tool buttons to allow grouping - #600
Merged
Conversation
10 tasks
RobertMueller2
force-pushed
the
tool_groups
branch
2 times, most recently
from
August 4, 2026 06:53
2f5c11a to
f0f79af
Compare
Closes: Satty-org#538 prereq for Satty-org#469 builds on Satty-org#555 because it makes no sense otherwise. This allows grouping tools under one button. E.g. arrow and line, rectangle and circle Used FactoryComponent along with FactoryVecDeque because that simplified reference storage on the toolbar.
RobertMueller2
force-pushed
the
tool_groups
branch
from
August 8, 2026 19:20
a765fcf to
7d9e0bb
Compare
Collaborator
|
LGTM |
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: #538
prereq for #469
This allows grouping tools under one button. e.g. arrow and line, rectangle and circle. Right-click opens popover.
Used FactoryComponent along with FactoryVecDeque because that simplified reference storage on the toolbar. Controllers can't be cloned, that made a regular component quite tricky here, i've tried for quite a while to use a regular Component, this would likely have required more explicit lifetimes.
The downside of this is, ungrouped tools also have to use the new component. I can't exclude for 100% that a mixed use was possible, but the code would have been messier that way.
I'm not implementing any variants here, that can be done later and needs new issues per variant. There will be some with pixelate, though.
Video slightly outdated, the popver buttons now show both icon and label.
tool_groups.mp4