mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: Do not hide Preview button & color code it
This commit is contained in:
parent
d4b250d509
commit
a4313c26cb
@ -53,7 +53,9 @@ const ProgressImagePreview = () => {
|
|||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return showProgressWindow ? (
|
return (
|
||||||
|
<>
|
||||||
|
{showProgressWindow && (
|
||||||
<Rnd
|
<Rnd
|
||||||
bounds="window"
|
bounds="window"
|
||||||
minHeight={200}
|
minHeight={200}
|
||||||
@ -72,7 +74,12 @@ const ProgressImagePreview = () => {
|
|||||||
onResizeStop={(e, direction, ref, delta, position) => {
|
onResizeStop={(e, direction, ref, delta, position) => {
|
||||||
const newRect: Partial<Rect> = {};
|
const newRect: Partial<Rect> = {};
|
||||||
|
|
||||||
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) {
|
if (ref.style.width) {
|
||||||
newRect.width = ref.style.width;
|
newRect.width = ref.style.width;
|
||||||
@ -174,18 +181,25 @@ const ProgressImagePreview = () => {
|
|||||||
)}
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
</Rnd>
|
</Rnd>
|
||||||
) : (
|
)}
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
onClick={() => dispatch(setShouldShowProgressImages(true))}
|
onClick={() =>
|
||||||
|
dispatch(setShouldShowProgressImages(!showProgressWindow))
|
||||||
|
}
|
||||||
tooltip={t('ui.showProgressImages')}
|
tooltip={t('ui.showProgressImages')}
|
||||||
sx={{
|
sx={{
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
bottom: 4,
|
bottom: 4,
|
||||||
insetInlineStart: 4,
|
insetInlineStart: 4,
|
||||||
|
background: showProgressWindow ? 'accent.600' : 'base.700',
|
||||||
|
_hover: {
|
||||||
|
background: showProgressWindow ? 'accent.500' : 'base.600',
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
aria-label={t('ui.showProgressImages')}
|
aria-label={t('ui.showProgressImages')}
|
||||||
icon={<FaStopwatch />}
|
icon={<FaStopwatch />}
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user