mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): regional prompts default layer opacity
This commit is contained in:
parent
dcb4a40741
commit
9e1a4a4a07
@ -1,6 +1,9 @@
|
|||||||
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 { promptLayerOpacityChanged } from 'features/regionalPrompts/store/regionalPromptsSlice';
|
import {
|
||||||
|
initialRegionalPromptsState,
|
||||||
|
promptLayerOpacityChanged,
|
||||||
|
} 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 +20,22 @@ export const PromptLayerOpacity = memo(() => {
|
|||||||
return (
|
return (
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<FormLabel>Layer Opacity</FormLabel>
|
<FormLabel>Layer Opacity</FormLabel>
|
||||||
<CompositeSlider min={0.25} max={1} step={0.01} value={promptLayerOpacity} onChange={onChange} />
|
<CompositeSlider
|
||||||
<CompositeNumberInput min={0.25} max={1} step={0.01} value={promptLayerOpacity} onChange={onChange} />
|
min={0.25}
|
||||||
|
max={1}
|
||||||
|
step={0.01}
|
||||||
|
value={promptLayerOpacity}
|
||||||
|
defaultValue={initialRegionalPromptsState.promptLayerOpacity}
|
||||||
|
onChange={onChange}
|
||||||
|
/>
|
||||||
|
<CompositeNumberInput
|
||||||
|
min={0.25}
|
||||||
|
max={1}
|
||||||
|
step={0.01}
|
||||||
|
value={promptLayerOpacity}
|
||||||
|
defaultValue={initialRegionalPromptsState.promptLayerOpacity}
|
||||||
|
onChange={onChange}
|
||||||
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -69,7 +69,7 @@ type RegionalPromptsState = {
|
|||||||
autoNegative: ParameterAutoNegative;
|
autoNegative: ParameterAutoNegative;
|
||||||
};
|
};
|
||||||
|
|
||||||
const initialRegionalPromptsState: RegionalPromptsState = {
|
export const initialRegionalPromptsState: RegionalPromptsState = {
|
||||||
_version: 1,
|
_version: 1,
|
||||||
tool: 'brush',
|
tool: 'brush',
|
||||||
selectedLayer: null,
|
selectedLayer: null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user