mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 14:08:12 +08:00
Minor UI design style revamp
This commit is contained in:
@@ -5,8 +5,6 @@ import { Transform, Type, plainToClass } from "class-transformer";
|
||||
import { type IconName, type IconSize } from "@graphite/utility-functions/icons";
|
||||
import { type WasmEditorInstance, type WasmRawInstance } from "@graphite/wasm-communication/editor";
|
||||
|
||||
import type MenuList from "@graphite/components/floating-menus/MenuList.svelte";
|
||||
|
||||
export class JsMessage {
|
||||
// The marker provides a way to check if an object is a sub-class constructor for a jsMessage.
|
||||
static readonly jsMessageMarker = true;
|
||||
@@ -753,21 +751,21 @@ export class LayerMetadata {
|
||||
selected!: boolean;
|
||||
}
|
||||
|
||||
export type LayerType = "Folder" | "NodeGraphFrame" | "Text";
|
||||
export type LayerType = "Folder" | "NodeGraphFrame";
|
||||
|
||||
export type LayerTypeData = {
|
||||
name: string;
|
||||
icon: IconName;
|
||||
};
|
||||
|
||||
export function layerTypeData(layerType: LayerType): LayerTypeData | undefined {
|
||||
// TODO: Delete this function after renaming NodeGraphFrame to Layer, since it will basically just return its input parameter
|
||||
export function layerTypeData(layerType: LayerType): LayerTypeData {
|
||||
const entries: Record<string, LayerTypeData> = {
|
||||
NodeGraphFrame: { name: "Layer", icon: "Layer" },
|
||||
Folder: { name: "Folder", icon: "Folder" },
|
||||
Text: { name: "Text", icon: "NodeText" },
|
||||
};
|
||||
|
||||
return entries[layerType];
|
||||
return entries[layerType] || { name: "Error", icon: "Info" };
|
||||
}
|
||||
|
||||
export class ImaginateImageData {
|
||||
@@ -834,9 +832,10 @@ export class ColorInput extends WidgetProps {
|
||||
)
|
||||
value!: Color;
|
||||
|
||||
noTransparency!: boolean;
|
||||
|
||||
disabled!: boolean;
|
||||
// TODO: Implement
|
||||
// allowTransparency!: boolean;
|
||||
// allowNone!: boolean;
|
||||
// disabled!: boolean;
|
||||
|
||||
@Transform(({ value }: { value: string }) => value || undefined)
|
||||
tooltip!: string | undefined;
|
||||
@@ -864,7 +863,7 @@ export type MenuListEntry = MenuEntryCommon & {
|
||||
disabled?: boolean;
|
||||
tooltip?: string;
|
||||
font?: URL;
|
||||
ref?: MenuList;
|
||||
ref?: any;
|
||||
};
|
||||
|
||||
export class DropdownInput extends WidgetProps {
|
||||
|
||||
Reference in New Issue
Block a user