feat(ui): cleared selected layer styling

This commit is contained in:
psychedelicious 2024-04-18 16:36:37 +10:00 committed by Kent Keirsey
parent 85f4a066fb
commit f2dde9a035

View File

@ -1,6 +1,6 @@
import { Flex, Spacer, Text } from '@invoke-ai/ui-library'; import { Flex, Spacer, Text } from '@invoke-ai/ui-library';
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import { rgbColorToString } from 'features/canvas/util/colorToString'; import { rgbaColorToString } from 'features/canvas/util/colorToString';
import { LayerColorPicker } from 'features/regionalPrompts/components/LayerColorPicker'; import { LayerColorPicker } from 'features/regionalPrompts/components/LayerColorPicker';
import { LayerMenu } from 'features/regionalPrompts/components/LayerMenu'; import { LayerMenu } from 'features/regionalPrompts/components/LayerMenu';
import { LayerVisibilityToggle } from 'features/regionalPrompts/components/LayerVisibilityToggle'; import { LayerVisibilityToggle } from 'features/regionalPrompts/components/LayerVisibilityToggle';
@ -21,7 +21,7 @@ export const LayerListItem = memo(({ id }: Props) => {
const color = useAppSelector((s) => { const color = useAppSelector((s) => {
const color = s.regionalPrompts.layers.find((l) => l.id === id)?.color; const color = s.regionalPrompts.layers.find((l) => l.id === id)?.color;
if (color) { if (color) {
return rgbColorToString(color); return rgbaColorToString({ ...color, a: selectedLayer === id ? 1 : 0.35 });
} }
return 'base.700'; return 'base.700';
}); });