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();
|
||||
|
||||
return showProgressWindow ? (
|
||||
return (
|
||||
<>
|
||||
{showProgressWindow && (
|
||||
<Rnd
|
||||
bounds="window"
|
||||
minHeight={200}
|
||||
@ -72,7 +74,12 @@ const ProgressImagePreview = () => {
|
||||
onResizeStop={(e, direction, ref, delta, position) => {
|
||||
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) {
|
||||
newRect.width = ref.style.width;
|
||||
@ -174,18 +181,25 @@ const ProgressImagePreview = () => {
|
||||
)}
|
||||
</Flex>
|
||||
</Rnd>
|
||||
) : (
|
||||
)}
|
||||
<IAIIconButton
|
||||
onClick={() => dispatch(setShouldShowProgressImages(true))}
|
||||
onClick={() =>
|
||||
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={<FaStopwatch />}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user