From 6a5510146c96122d6476f5acb646cfa62b0b60d4 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 19 Apr 2024 22:29:42 +1000 Subject: [PATCH] feat(ui): add default rp brush size --- .../regionalPrompts/components/BrushSize.tsx | 18 +++++++++++++++--- .../store/regionalPromptsSlice.ts | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/BrushSize.tsx b/invokeai/frontend/web/src/features/regionalPrompts/components/BrushSize.tsx index 23f996e6c3..03491abe95 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/BrushSize.tsx +++ b/invokeai/frontend/web/src/features/regionalPrompts/components/BrushSize.tsx @@ -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 ( {t('regionalPrompts.brushSize')} - - + + ); }); diff --git a/invokeai/frontend/web/src/features/regionalPrompts/store/regionalPromptsSlice.ts b/invokeai/frontend/web/src/features/regionalPrompts/store/regionalPromptsSlice.ts index ff70d03c61..0b4e31a506 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/store/regionalPromptsSlice.ts +++ b/invokeai/frontend/web/src/features/regionalPrompts/store/regionalPromptsSlice.ts @@ -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,