mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-16 00:25:25 -05:00
feat(ui): remove "solid" background option
This commit is contained in:
@@ -89,7 +89,7 @@ const initialState: CanvasV2State = {
|
||||
showHUD: true,
|
||||
clipToBbox: false,
|
||||
cropToBboxOnSave: false,
|
||||
canvasBackgroundStyle: 'checkerboard',
|
||||
dynamicGrid: false,
|
||||
},
|
||||
compositing: {
|
||||
maskBlur: 16,
|
||||
@@ -473,7 +473,7 @@ export const {
|
||||
allEntitiesDeleted,
|
||||
clipToBboxChanged,
|
||||
canvasReset,
|
||||
canvasBackgroundStyleChanged,
|
||||
settingsDynamicGridToggled,
|
||||
// All entities
|
||||
entitySelected,
|
||||
entityNameChanged,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { PayloadAction, SliceCaseReducers } from '@reduxjs/toolkit';
|
||||
import type { CanvasBackgroundStyle, CanvasV2State } from 'features/controlLayers/store/types';
|
||||
import type { CanvasV2State } from 'features/controlLayers/store/types';
|
||||
|
||||
export const settingsReducers = {
|
||||
clipToBboxChanged: (state, action: PayloadAction<boolean>) => {
|
||||
state.settings.clipToBbox = action.payload;
|
||||
},
|
||||
canvasBackgroundStyleChanged: (state, action: PayloadAction<CanvasBackgroundStyle>) => {
|
||||
state.settings.canvasBackgroundStyle = action.payload;
|
||||
settingsDynamicGridToggled: (state) => {
|
||||
state.settings.dynamicGrid = !state.settings.dynamicGrid;
|
||||
},
|
||||
} satisfies SliceCaseReducers<CanvasV2State>;
|
||||
|
||||
@@ -834,11 +834,6 @@ export type StagingAreaImage = {
|
||||
offsetY: number;
|
||||
};
|
||||
|
||||
const zCanvasBackgroundStyle = z.enum(['checkerboard', 'dynamicGrid', 'solid']);
|
||||
export type CanvasBackgroundStyle = z.infer<typeof zCanvasBackgroundStyle>;
|
||||
export const isCanvasBackgroundStyle = (v: unknown): v is CanvasBackgroundStyle =>
|
||||
zCanvasBackgroundStyle.safeParse(v).success;
|
||||
|
||||
export type CanvasV2State = {
|
||||
_version: 3;
|
||||
selectedEntityIdentifier: CanvasEntityIdentifier | null;
|
||||
@@ -877,7 +872,7 @@ export type CanvasV2State = {
|
||||
preserveMaskedArea: boolean;
|
||||
cropToBboxOnSave: boolean;
|
||||
clipToBbox: boolean;
|
||||
canvasBackgroundStyle: CanvasBackgroundStyle;
|
||||
dynamicGrid: boolean;
|
||||
};
|
||||
bbox: {
|
||||
rect: {
|
||||
|
||||
Reference in New Issue
Block a user