mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix node opacity slider hitbox
This commit is contained in:
parent
f9fc89b3c5
commit
6d111aac90
@ -1,13 +1,13 @@
|
||||
import {
|
||||
Box,
|
||||
Flex,
|
||||
Slider,
|
||||
SliderFilledTrack,
|
||||
SliderThumb,
|
||||
SliderTrack,
|
||||
} from '@chakra-ui/react';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { useCallback } from 'react';
|
||||
import { nodeOpacityChanged } from 'features/nodes/store/nodesSlice';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
export default function NodeOpacitySlider() {
|
||||
const dispatch = useAppDispatch();
|
||||
@ -21,7 +21,7 @@ export default function NodeOpacitySlider() {
|
||||
);
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Flex alignItems="center">
|
||||
<Slider
|
||||
aria-label="Node Opacity"
|
||||
value={nodeOpacity}
|
||||
@ -31,12 +31,13 @@ export default function NodeOpacitySlider() {
|
||||
onChange={handleChange}
|
||||
orientation="vertical"
|
||||
defaultValue={30}
|
||||
h="calc(100% - 0.5rem)"
|
||||
>
|
||||
<SliderTrack>
|
||||
<SliderFilledTrack />
|
||||
</SliderTrack>
|
||||
<SliderThumb />
|
||||
</Slider>
|
||||
</Box>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
|
@ -22,8 +22,8 @@ const invokeAIFilledTrack = defineStyle((props) => {
|
||||
|
||||
const invokeAIThumb = defineStyle((props) => {
|
||||
return {
|
||||
w: 2,
|
||||
h: 4,
|
||||
w: props.orientation === 'horizontal' ? 2 : 4,
|
||||
h: props.orientation === 'horizontal' ? 4 : 2,
|
||||
bg: mode('base.50', 'base.100')(props),
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user