Skip to content

Commit b20e362

Browse files
committed
make "Adjust brush size by area" Default behavior
1 parent dd237f2 commit b20e362

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ onUiLoaded(async() => {
476476
if (!withoutValue) {
477477
const maxValue =
478478
parseFloat(input.getAttribute("max")) || 100;
479-
if (opts.canvas_hotkey_brush_scale === "Radius") {
479+
if (opts.canvas_hotkey_brush_factor_mode === "Radius") {
480480
const changeAmount = maxValue * (percentage / 100);
481481
const newValue =
482482
parseFloat(input.value) +

extensions-builtin/canvas-zoom-and-pan/scripts/hotkey_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"canvas_auto_expand": shared.OptionInfo(True, "Automatically expands an image that does not fit completely in the canvas area, similar to manually pressing the S and R buttons"),
1717
"canvas_blur_prompt": shared.OptionInfo(False, "Take the focus off the prompt when working with a canvas"),
1818
"canvas_disabled_functions": shared.OptionInfo(["Overlap"], "Disable function that you don't use", gr.CheckboxGroup, {"choices": ["Zoom", "Adjust brush size", "Hotkey enlarge brush", "Hotkey shrink brush", "Undo", "Clear", "Moving canvas", "Fullscreen", "Reset Zoom", "Overlap"]}),
19-
"canvas_hotkey_brush_scale": shared.OptionInfo("Radius", "Brush scale", gr.Radio, {"choices": ["Radius", "Area"]}),
19+
"canvas_hotkey_brush_factor_mode": shared.OptionInfo("Radius", "Brush size adjustment mode", gr.Radio, {"choices": ["Area", "Radius"]}),
2020
"canvas_hotkey_brush_factor": shared.OptionInfo(0.1, "Brush factor", gr.Slider, {"minimum": 0, "maximum": 2, "step": 0.01})
2121
}))

0 commit comments

Comments
 (0)