diff --git a/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss b/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss index 72a0764787..1fdaf645bc 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss +++ b/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.scss @@ -2,18 +2,12 @@ position: absolute; top: 0; left: 0; - display: flex; z-index: 2; margin: 0.5rem; pointer-events: none; - background-color: var(--inpainting-alerts-bg); - border-radius: 0.2rem; - overflow: hidden; button { - border-radius: 0; - height: 100%; - vertical-align: top; + background-color: var(--inpainting-alerts-bg); svg { fill: var(--inpainting-alerts-icon-color); diff --git a/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.tsx b/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.tsx index 8f22737498..645bd456bc 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.tsx +++ b/frontend/src/features/tabs/Inpainting/InpaintingCanvasStatusIcons.tsx @@ -8,6 +8,7 @@ const inpaintingCanvasStatusIconsSelector = createSelector( shouldInvertMask, shouldLockBoundingBox, shouldShowBoundingBox, + boundingBoxDimensions, } = inpainting; return { @@ -15,6 +16,8 @@ const inpaintingCanvasStatusIconsSelector = createSelector( shouldInvertMask, shouldLockBoundingBox, shouldShowBoundingBox, + isBoundingBoxTooSmall: + boundingBoxDimensions.width < 512 || boundingBoxDimensions.height < 512, }; }, { @@ -24,9 +27,10 @@ const inpaintingCanvasStatusIconsSelector = createSelector( } ); -import { IconButton } from '@chakra-ui/react'; +import { ButtonGroup, IconButton } from '@chakra-ui/react'; import { createSelector } from '@reduxjs/toolkit'; import { BiHide, BiShow } from 'react-icons/bi'; +import { GiResize } from 'react-icons/gi'; import { BsBoundingBox } from 'react-icons/bs'; import { FaLock, FaUnlock } from 'react-icons/fa'; import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md'; @@ -39,11 +43,12 @@ const InpaintingCanvasStatusIcons = () => { shouldInvertMask, shouldLockBoundingBox, shouldShowBoundingBox, + isBoundingBoxTooSmall, } = useAppSelector(inpaintingCanvasStatusIconsSelector); return (
-
+ { data-selected={!shouldShowMask} icon={shouldShowMask ? : } /> -
-
{ data-selected={shouldInvertMask} icon={shouldInvertMask ? : } /> -
-
{ data-selected={shouldLockBoundingBox} icon={shouldLockBoundingBox ? : } /> -
-
{ data-alert={!shouldShowBoundingBox} icon={} /> -
+ } + /> +
); };