Adding Bounding Box Reset Disables

Add disable conditions for reset buttons on bounding box width and height
This commit is contained in:
blessedcoolant 2022-10-28 08:05:40 +13:00 committed by psychedelicious
parent 6679e5be69
commit acdffb1503
7 changed files with 16 additions and 11 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -69,12 +69,6 @@
width: 10px;
height: 10px;
}
&:hover {
path {
// fill: ;
}
}
}
}
}

View File

@ -116,7 +116,11 @@ const IAINumberInput = (props: Props) => {
<FormControl
isDisabled={isDisabled}
isInvalid={isInvalid}
className={`invokeai__number-input-form-control ${styleClass}`}
className={
styleClass
? `invokeai__number-input-form-control ${styleClass}`
: `invokeai__number-input-form-control`
}
{...formControlProps}
>
<FormLabel

View File

@ -1,7 +1,6 @@
.inpainting-bounding-box-settings {
display: flex;
flex-direction: column;
max-width: 100%;
border-radius: 0.4rem;
border: 2px solid var(--tab-color);
}
@ -34,8 +33,8 @@
}
.inpainting-bounding-box-dimensions-slider-numberinput {
display: flex;
justify-content: space-between;
display: grid;
grid-template-columns: repeat(3, auto);
column-gap: 1rem;
}

View File

@ -129,6 +129,10 @@ const BoundingBoxSettings = () => {
onClick={handleResetWidth}
icon={<BiReset />}
styleClass="inpainting-bounding-box-reset-icon-btn"
isDisabled={
!shouldShowBoundingBox ||
canvasDimensions.width === boundingBoxDimensions.width
}
/>
</div>
<div className="inpainting-bounding-box-dimensions-slider-numberinput">
@ -159,6 +163,10 @@ const BoundingBoxSettings = () => {
onClick={handleResetHeight}
icon={<BiReset />}
styleClass="inpainting-bounding-box-reset-icon-btn"
isDisabled={
!shouldShowBoundingBox ||
canvasDimensions.height === boundingBoxDimensions.height
}
/>
</div>
<IAICheckbox