Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

feat(canvas): layer blend row UI tweaks

Josh Corbettd015f324f20c
diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerBlendRow.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerBlendRow.tsx
index 469a7d2103..e2f72938b3 100644
--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerBlendRow.tsx
+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerBlendRow.tsx
@@ -15,8 +15,8 @@ import { useTranslation } from 'react-i18next';
type LayerBlendRowEngine = Pick<CanvasEngineHandle, 'document' | 'exports' | 'interaction' | 'layers' | 'projectId'>;
const SELECT_POSITIONING = { placement: 'bottom-start', sameWidth: true } as const;
-const BLEND_TRIGGER_PROPS = { fontSize: '2xs', h: '6', minH: '6' } as const;
-const OPACITY_INPUT_PROPS = { fontSize: '2xs', h: '6' } as const;
+const BLEND_TRIGGER_PROPS = { fontSize: 'xs', h: '7', minH: '7' } as const;
+const OPACITY_INPUT_PROPS = { fontSize: 'xs', h: '7' } as const;
const clamp01 = (value: number): number => Math.min(1, Math.max(0, value));
@@ -39,7 +39,7 @@ export const LayerBlendRow = ({ engine }: { engine: LayerBlendRowEngine | null }
const editingLocked = useCanvasDocumentEditingLocked(engine);
return (
- <Flex align="center" flexShrink={0} gap="1.5" mx="1.5" pb="1" pt="0.5">
+ <Flex align="center" flexShrink={0} gap="1.5" mx="1.5">
<BlendModeControl editingLocked={editingLocked} engine={engine} layer={layer} />
<OpacityRow editingLocked={editingLocked} engine={engine} layer={layer} />
</Flex>
@@ -201,7 +201,7 @@ const OpacityRow = ({
disabled={disabled}
max={100}
min={0}
- size="xs"
+ size="sm"
step={1}
value={opacityPercent}
w="16"
diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersWidgetView.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersWidgetView.tsx
index 47921cb65e..0e7e4f3cbe 100644
--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersWidgetView.tsx
+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersWidgetView.tsx
@@ -129,7 +129,7 @@ export const LayersWidgetView = ({ runtime }: WidgetViewProps) => {
const closeAddMenu = useCallback(() => setAddMenuAnchor(null), []);
return (
- <Stack gap="0.5" h="full" minH="0">
+ <Stack gap="0" h="full" minH="0">
<LayerColorPane layout={colorPaneLayout} onLayoutChange={handleColorPaneLayout} />
<SegmentTabs
activeId={treeTab}
@@ -143,10 +143,8 @@ export const LayersWidgetView = ({ runtime }: WidgetViewProps) => {
aria-labelledby={segmentTabsTabId(TREE_TABS_ID_BASE, treeTab)}
direction="column"
flex="1"
+ gap="0.5"
id={segmentTabsPanelId(TREE_TABS_ID_BASE)}
- // The blend row (~30px) + tree floor (128px) + footer (40px), with a
- // little slack; anything less lets the unshrinkable rows paint under
- // the editor panes.
minH="13rem"
overflow="hidden"
role="tabpanel"
@@ -169,7 +167,7 @@ export const LayersWidgetView = ({ runtime }: WidgetViewProps) => {
justify="center"
minH="8rem"
mx="2"
- p="4"
+ px="4"
rounded="md"
onContextMenu={handleEmptyAreaContextMenu}
>