diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings.scss b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings.scss index 3233c4a591..5eef7cc47d 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings.scss +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings.scss @@ -12,6 +12,16 @@ justify-content: space-between; padding: 0.5rem 1rem; border-radius: 0.4rem 0.4rem 0 0; + align-items: center; + + button { + width: 0.5rem !important; + height: 1.2rem !important; + background: none !important; + &:hover { + background: none !important; + } + } p { font-weight: bold; diff --git a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings.tsx b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings.tsx index 5ab30ba6ca..a76ddb988a 100644 --- a/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings.tsx +++ b/frontend/src/features/options/AdvancedOptions/Inpainting/BoundingBoxSettings.tsx @@ -1,7 +1,8 @@ import { Flex } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import _ from 'lodash'; -import { BiReset } from 'react-icons/bi'; + +import { BiHide, BiReset, BiShow } from 'react-icons/bi'; import { RootState, @@ -18,6 +19,7 @@ import { InpaintingState, setBoundingBoxDimensions, setShouldLockBoundingBox, + setShouldShowBoundingBox, setShouldShowBoundingBoxFill, } from '../../../tabs/Inpainting/inpaintingSlice'; @@ -27,6 +29,7 @@ const boundingBoxDimensionsSelector = createSelector( const { canvasDimensions, boundingBoxDimensions, + shouldShowBoundingBox, shouldShowBoundingBoxFill, pastLines, futureLines, @@ -35,6 +38,7 @@ const boundingBoxDimensionsSelector = createSelector( return { canvasDimensions, boundingBoxDimensions, + shouldShowBoundingBox, shouldShowBoundingBoxFill, pastLines, futureLines, @@ -53,6 +57,7 @@ const BoundingBoxSettings = () => { const { canvasDimensions, boundingBoxDimensions, + shouldShowBoundingBox, shouldShowBoundingBoxFill, shouldLockBoundingBox, } = useAppSelector(boundingBoxDimensionsSelector); @@ -101,10 +106,22 @@ const BoundingBoxSettings = () => { ); }; + const handleShowBoundingBox = () => + dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox)); + return (
Inpaint Box
+