diff --git a/invokeai/frontend/web/src/features/parameters/components/ProgressImagePreview.tsx b/invokeai/frontend/web/src/features/parameters/components/ProgressImagePreview.tsx index db487577f1..28dd6adf4f 100644 --- a/invokeai/frontend/web/src/features/parameters/components/ProgressImagePreview.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/ProgressImagePreview.tsx @@ -53,88 +53,50 @@ const ProgressImagePreview = () => { const { t } = useTranslation(); - return showProgressWindow ? ( - { - dispatch(floatingProgressImageMoved({ x: d.x, y: d.y })); - }} - onResizeStop={(e, direction, ref, delta, position) => { - const newRect: Partial = {}; + return ( + <> + {showProgressWindow && ( + { + dispatch(floatingProgressImageMoved({ x: d.x, y: d.y })); + }} + onResizeStop={(e, direction, ref, delta, position) => { + const newRect: Partial = {}; - console.log(ref.style.width, ref.style.height, position.x, position.y); + console.log( + ref.style.width, + ref.style.height, + position.x, + position.y + ); - if (ref.style.width) { - newRect.width = ref.style.width; - } - if (ref.style.height) { - newRect.height = ref.style.height; - } - if (position.x) { - newRect.x = position.x; - } - if (position.x) { - newRect.y = position.y; - } + if (ref.style.width) { + newRect.width = ref.style.width; + } + if (ref.style.height) { + newRect.height = ref.style.height; + } + if (position.x) { + newRect.x = position.x; + } + if (position.x) { + newRect.y = position.y; + } - dispatch(floatingProgressImageResized(newRect)); - }} - > - - - - - Progress Images - - - dispatch(setShouldShowProgressImages(false))} - aria-label={t('ui.hideProgressImages')} - size="xs" - icon={} - variant="ghost" - /> - - {progressImage ? ( { h: 'full', alignItems: 'center', justifyContent: 'center', + flexDir: 'column', + boxShadow: 'dark-lg', + bg: 'base.800', + borderRadius: 'base', }} > - + > + + + Progress Images + + + dispatch(setShouldShowProgressImages(false))} + aria-label={t('ui.hideProgressImages')} + size="xs" + icon={} + variant="ghost" + /> + + {progressImage ? ( + + + + ) : ( + + + + )} - ) : ( - - - - )} - - - ) : ( - dispatch(setShouldShowProgressImages(true))} - tooltip={t('ui.showProgressImages')} - sx={{ - position: 'absolute', - bottom: 4, - insetInlineStart: 4, - }} - aria-label={t('ui.showProgressImages')} - icon={} - /> + + )} + + dispatch(setShouldShowProgressImages(!showProgressWindow)) + } + tooltip={t('ui.showProgressImages')} + sx={{ + position: 'absolute', + bottom: 4, + insetInlineStart: 4, + background: showProgressWindow ? 'accent.600' : 'base.700', + _hover: { + background: showProgressWindow ? 'accent.500' : 'base.600', + }, + }} + aria-label={t('ui.showProgressImages')} + icon={} + /> + ); };