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 { 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 { useTranslation } from 'react-i18next';
|
||||
|
||||
@ -17,8 +17,20 @@ export const BrushSize = memo(() => {
|
||||
return (
|
||||
<FormControl>
|
||||
<FormLabel>{t('regionalPrompts.brushSize')}</FormLabel>
|
||||
<CompositeSlider min={1} max={100} value={brushSize} onChange={onChange} />
|
||||
<CompositeNumberInput min={1} max={500} value={brushSize} onChange={onChange} />
|
||||
<CompositeSlider
|
||||
min={1}
|
||||
max={300}
|
||||
defaultValue={initialRegionalPromptsState.brushSize}
|
||||
value={brushSize}
|
||||
onChange={onChange}
|
||||
/>
|
||||
<CompositeNumberInput
|
||||
min={1}
|
||||
max={600}
|
||||
defaultValue={initialRegionalPromptsState.brushSize}
|
||||
value={brushSize}
|
||||
onChange={onChange}
|
||||
/>
|
||||
</FormControl>
|
||||
);
|
||||
});
|
||||
|
@ -75,7 +75,7 @@ type RegionalPromptsState = {
|
||||
export const initialRegionalPromptsState: RegionalPromptsState = {
|
||||
_version: 1,
|
||||
selectedLayerId: null,
|
||||
brushSize: 40,
|
||||
brushSize: 100,
|
||||
layers: [],
|
||||
promptLayerOpacity: 0.5, // This currently doesn't work
|
||||
isEnabled: false,
|
||||
|
Loading…
Reference in New Issue
Block a user