From 9afe6b21a2e97b4f505e4735e9039b4996dd5f50 Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Fri, 5 May 2023 05:33:42 -0500 Subject: [PATCH] Adapted theme from stable-diffusion-webui-ux --- src/lib/components/BlockContainer.svelte | 18 +- src/lib/components/ComfyApp.svelte | 9 +- src/lib/components/ComfyProperties.svelte | 4 + src/lib/components/WidgetContainer.svelte | 4 +- src/lib/nodes/ComfyActionNodes.ts | 10 +- src/lib/nodes/ComfyWidgetNodes.ts | 3 - src/lib/stores/layoutState.ts | 20 +- src/lib/widgets/ButtonWidget.svelte | 4 +- src/lib/widgets/ComboWidget.svelte | 3 +- src/lib/widgets/ComfyGalleryWidget.svelte | 0 src/lib/widgets/GalleryWidget.svelte | 4 +- src/lib/widgets/RangeWidget.svelte | 2 +- src/lib/widgets/TextWidget.svelte | 2 +- src/scss/global.scss | 1 + src/scss/ux.scss | 759 ++++++++++++++++++++++ 15 files changed, 814 insertions(+), 29 deletions(-) delete mode 100644 src/lib/widgets/ComfyGalleryWidget.svelte create mode 100644 src/scss/ux.scss diff --git a/src/lib/components/BlockContainer.svelte b/src/lib/components/BlockContainer.svelte index ffcbe2e..6329b59 100644 --- a/src/lib/components/BlockContainer.svelte +++ b/src/lib/components/BlockContainer.svelte @@ -42,7 +42,7 @@ {#if container && children} {#key $attrsChanged} -
{#each children.filter(item => item.id !== SHADOW_PLACEHOLDER_ITEM_ID) as item(item.id)} - {@const hidden = item?.node?.properties?.hidden} + {@const hidden = item?.attrs?.hidden}
@@ -140,6 +140,18 @@ .container { display: flex; + > :global(*) { + border-radius: 0; + } + + > :global(.padded) { + padding: 10px 12px 0px 10px; + + &:last-child { + padding-bottom: 12px; + } + } + :global(.block) { height: fit-content; } @@ -214,7 +226,7 @@ .animation-wrapper { position: relative; - flex-grow: 1; + flex-grow: 100; } .handle-widget:hover { diff --git a/src/lib/components/ComfyApp.svelte b/src/lib/components/ComfyApp.svelte index a6dfc8a..f11ce46 100644 --- a/src/lib/components/ComfyApp.svelte +++ b/src/lib/components/ComfyApp.svelte @@ -3,6 +3,7 @@ import { get } from "svelte/store"; import { Pane, Splitpanes } from 'svelte-splitpanes'; import { Button } from "@gradio/button"; + import { BlockTitle } from "@gradio/atoms"; import ComfyUIPane from "./ComfyUIPane.svelte"; import ComfyApp, { type SerializedAppState } from "./ComfyApp"; import { Checkbox } from "@gradio/form" @@ -222,7 +223,9 @@ - +