mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Adds brush color alpha hotkey
This commit is contained in:
parent
db188cd3c3
commit
62ac725ba9
@ -86,7 +86,7 @@ const IAICanvasToolChooserOptions = () => {
|
||||
);
|
||||
|
||||
useHotkeys(
|
||||
['['],
|
||||
['BracketLeft'],
|
||||
() => {
|
||||
dispatch(setBrushSize(Math.max(brushSize - 5, 5)));
|
||||
},
|
||||
@ -98,7 +98,7 @@ const IAICanvasToolChooserOptions = () => {
|
||||
);
|
||||
|
||||
useHotkeys(
|
||||
[']'],
|
||||
['BracketRight'],
|
||||
() => {
|
||||
dispatch(setBrushSize(Math.min(brushSize + 5, 500)));
|
||||
},
|
||||
@ -109,6 +109,40 @@ const IAICanvasToolChooserOptions = () => {
|
||||
[brushSize]
|
||||
);
|
||||
|
||||
useHotkeys(
|
||||
['shift+BracketLeft'],
|
||||
() => {
|
||||
dispatch(
|
||||
setBrushColor({
|
||||
...brushColor,
|
||||
a: _.clamp(brushColor.a - 0.05, 0.05, 1),
|
||||
})
|
||||
);
|
||||
},
|
||||
{
|
||||
enabled: () => true,
|
||||
preventDefault: true,
|
||||
},
|
||||
[brushColor]
|
||||
);
|
||||
|
||||
useHotkeys(
|
||||
['shift+BracketRight'],
|
||||
() => {
|
||||
dispatch(
|
||||
setBrushColor({
|
||||
...brushColor,
|
||||
a: _.clamp(brushColor.a + 0.05, 0.05, 1),
|
||||
})
|
||||
);
|
||||
},
|
||||
{
|
||||
enabled: () => true,
|
||||
preventDefault: true,
|
||||
},
|
||||
[brushColor]
|
||||
);
|
||||
|
||||
const handleSelectBrushTool = () => dispatch(setTool('brush'));
|
||||
const handleSelectEraserTool = () => dispatch(setTool('eraser'));
|
||||
const handleSelectColorPickerTool = () => dispatch(setTool('colorPicker'));
|
||||
|
@ -158,6 +158,16 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
|
||||
desc: 'Increases the size of the canvas brush/eraser',
|
||||
hotkey: ']',
|
||||
},
|
||||
{
|
||||
title: 'Decrease Brush Opacity',
|
||||
desc: 'Decreases the opacity of the canvas brush',
|
||||
hotkey: 'Shift + [',
|
||||
},
|
||||
{
|
||||
title: 'Increase Brush Opacity',
|
||||
desc: 'Increases the opacity of the canvas brush',
|
||||
hotkey: 'Shift + ]',
|
||||
},
|
||||
{
|
||||
title: 'Move Tool',
|
||||
desc: 'Allows canvas navigation',
|
||||
|
Loading…
Reference in New Issue
Block a user