Address feedback

- moves mask clear button
- fixes intermediates
- shrinks inpainting icons by 10%
This commit is contained in:
psychedelicious 2022-11-03 01:29:51 +11:00 committed by Lincoln Stein
parent 7ba958cf7f
commit c6118e8898
3 changed files with 14 additions and 2 deletions

View File

@ -30,6 +30,7 @@ export const imagesSelector = createSelector(
return { return {
imageToDisplay: intermediateImage ? intermediateImage : currentImage, imageToDisplay: intermediateImage ? intermediateImage : currentImage,
isIntermediate: intermediateImage,
currentCategory, currentCategory,
isOnFirstImage: currentImageIndex === 0, isOnFirstImage: currentImageIndex === 0,
isOnLastImage: isOnLastImage:
@ -55,6 +56,7 @@ export default function CurrentImagePreview() {
isOnLastImage, isOnLastImage,
shouldShowImageDetails, shouldShowImageDetails,
imageToDisplay, imageToDisplay,
isIntermediate,
} = useAppSelector(imagesSelector); } = useAppSelector(imagesSelector);
const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] = const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] =
@ -78,7 +80,13 @@ export default function CurrentImagePreview() {
return ( return (
<div className={'current-image-preview'}> <div className={'current-image-preview'}>
{imageToDisplay && <Image src={imageToDisplay.url} />} {imageToDisplay && (
<Image
src={imageToDisplay.url}
width={isIntermediate ? imageToDisplay.width : undefined}
height={isIntermediate ? imageToDisplay.height : undefined}
/>
)}
{!shouldShowImageDetails && ( {!shouldShowImageDetails && (
<div className="current-image-next-prev-buttons"> <div className="current-image-next-prev-buttons">
<div <div

View File

@ -13,6 +13,10 @@
align-items: center; align-items: center;
column-gap: 0.5rem; column-gap: 0.5rem;
svg {
transform: scale(0.9);
}
.inpainting-buttons-group { .inpainting-buttons-group {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -23,12 +23,12 @@ const InpaintingControls = () => {
<InpaintingMaskInvertControl /> <InpaintingMaskInvertControl />
<InpaintingLockBoundingBoxControl /> <InpaintingLockBoundingBoxControl />
<InpaintingShowHideBoundingBoxControl /> <InpaintingShowHideBoundingBoxControl />
<InpaintingMaskClear />
</ButtonGroup> </ButtonGroup>
<ButtonGroup isAttached={true}> <ButtonGroup isAttached={true}>
<InpaintingUndoControl /> <InpaintingUndoControl />
<InpaintingRedoControl /> <InpaintingRedoControl />
<InpaintingMaskClear />
</ButtonGroup> </ButtonGroup>
<ButtonGroup isAttached={true}> <ButtonGroup isAttached={true}>
<ImageUploaderIconButton /> <ImageUploaderIconButton />