mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): add default rp brush size
This commit is contained in:
parent
9667f77c41
commit
6a5510146c
@ -1,6 +1,6 @@
|
|||||||
import { CompositeNumberInput, CompositeSlider, FormControl, FormLabel } from '@invoke-ai/ui-library';
|
import { CompositeNumberInput, CompositeSlider, FormControl, FormLabel } from '@invoke-ai/ui-library';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import { brushSizeChanged } from 'features/regionalPrompts/store/regionalPromptsSlice';
|
import { brushSizeChanged, initialRegionalPromptsState } from 'features/regionalPrompts/store/regionalPromptsSlice';
|
||||||
import { memo, useCallback } from 'react';
|
import { memo, useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
@ -17,8 +17,20 @@ export const BrushSize = memo(() => {
|
|||||||
return (
|
return (
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<FormLabel>{t('regionalPrompts.brushSize')}</FormLabel>
|
<FormLabel>{t('regionalPrompts.brushSize')}</FormLabel>
|
||||||
<CompositeSlider min={1} max={100} value={brushSize} onChange={onChange} />
|
<CompositeSlider
|
||||||
<CompositeNumberInput min={1} max={500} value={brushSize} onChange={onChange} />
|
min={1}
|
||||||
|
max={300}
|
||||||
|
defaultValue={initialRegionalPromptsState.brushSize}
|
||||||
|
value={brushSize}
|
||||||
|
onChange={onChange}
|
||||||
|
/>
|
||||||
|
<CompositeNumberInput
|
||||||
|
min={1}
|
||||||
|
max={600}
|
||||||
|
defaultValue={initialRegionalPromptsState.brushSize}
|
||||||
|
value={brushSize}
|
||||||
|
onChange={onChange}
|
||||||
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -75,7 +75,7 @@ type RegionalPromptsState = {
|
|||||||
export const initialRegionalPromptsState: RegionalPromptsState = {
|
export const initialRegionalPromptsState: RegionalPromptsState = {
|
||||||
_version: 1,
|
_version: 1,
|
||||||
selectedLayerId: null,
|
selectedLayerId: null,
|
||||||
brushSize: 40,
|
brushSize: 100,
|
||||||
layers: [],
|
layers: [],
|
||||||
promptLayerOpacity: 0.5, // This currently doesn't work
|
promptLayerOpacity: 0.5, // This currently doesn't work
|
||||||
isEnabled: false,
|
isEnabled: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user