-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Canvas: Undo & Clear hotkey, brush scales by area, consistent max brush size #16668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
I don't see reason to include a toggle between Radius and Area brush resizing. Area is clearly better, and software such as Photoshop functions in the same way. |
while I do agree scaling by Area is better, but I wouldn't say there's no point using linear radius the the real issue with our scaling by linear Radius scaling is more due to the large steps size 5% of the maximum brush size if we really want to be advance we could also make it so that users can quickly toggle between both modes with a hotkey |
remove the overly complex option of radius / area brush size change mode
395580c to
1b9dea7
Compare
|
I think I figured out how gradio decides the maximum brush size so basically across each element the maximum plus size but appear "visually" to be the same in my current implementation the maximum breast size is only updated after user has adjusted to the brush size using the hotkey for scroll wheel |
the minimum supported brush size is 1 pixel
|






Description
ZkeyCkey2024-11-20.06_59_08_899.chrome.mp4
Areaand(new commit removedRadiusRadiusmode)Radiusof the brushAreain my opinion
Areamode it's much more usable thanRadiusmodeas such I have made the
Areamode theDefaultchanging old behaviorusers who prefer the old method can configure it in settings
Radius
2024-11-20.07_00_34_898.chrome.mp4
Area
2024-11-20.07_01_34_712.chrome.mp4
notice that the Area mode brush size step is much more smoother then Radius
Brush size is set to 1/2 diagonal image, beyond the gradio default after the usere uses either the hotkeys or scroll wheel to change the brush size
Considering there's no timeline for Gradio 4 or 5
I think implement this relatively trivial function is worth it
future potential improvements / discussion
add hotkey for removeing the image?
in the PR only the factor / step for
Areamode is configurable, while the5%step in Radius model is hardcodedshould it be made configurable, if so should it share the same setting key as the factor used for
AreamodeChecklist: