From e488b2abcebbdd6191652f2859ec365fa53556b9 Mon Sep 17 00:00:00 2001 From: bymyself Date: Mon, 9 Jun 2025 04:58:17 -0700 Subject: [PATCH] standardize size and color --- .../graph/widgets/BadgedNumberInput.vue | 43 +++++++++++++++---- .../graph/widgets/ColorPickerWidget.vue | 12 ++---- .../graph/widgets/DropdownComboWidget.vue | 2 +- src/components/graph/widgets/StringWidget.vue | 4 +- .../widgets/useBadgedNumberInput.ts | 2 +- src/composables/widgets/useComboWidget.ts | 4 +- .../widgets/useDropdownComboWidget.ts | 4 +- 7 files changed, 45 insertions(+), 26 deletions(-) diff --git a/src/components/graph/widgets/BadgedNumberInput.vue b/src/components/graph/widgets/BadgedNumberInput.vue index 10f78a1a4..06843803e 100644 --- a/src/components/graph/widgets/BadgedNumberInput.vue +++ b/src/components/graph/widgets/BadgedNumberInput.vue @@ -1,10 +1,13 @@ diff --git a/src/composables/widgets/useBadgedNumberInput.ts b/src/composables/widgets/useBadgedNumberInput.ts index 1d4a749f7..70069b1a4 100644 --- a/src/composables/widgets/useBadgedNumberInput.ts +++ b/src/composables/widgets/useBadgedNumberInput.ts @@ -118,7 +118,7 @@ export const useBadgedNumberInput = ( // Optional: minimum height for the widget getMinHeight: () => minHeight + PADDING, // Lock maximum height to prevent oversizing - getMaxHeight: () => 45, + getMaxHeight: () => 48, // Optional: whether to serialize this widget's value serialize diff --git a/src/composables/widgets/useComboWidget.ts b/src/composables/widgets/useComboWidget.ts index fe189f735..e892c9702 100644 --- a/src/composables/widgets/useComboWidget.ts +++ b/src/composables/widgets/useComboWidget.ts @@ -31,9 +31,9 @@ const addMultiSelectWidget = (node: LGraphNode, inputSpec: ComboInputSpec) => { widgetValue.value = value }, // Optional: minimum height for the widget (multiselect needs minimal height) - getMinHeight: () => 32, + getMinHeight: () => 24, // Lock maximum height to prevent oversizing - getMaxHeight: () => 45, + getMaxHeight: () => 32, // Optional: whether to serialize this widget's value serialize: true } diff --git a/src/composables/widgets/useDropdownComboWidget.ts b/src/composables/widgets/useDropdownComboWidget.ts index 7bf167929..0a03c3ebc 100644 --- a/src/composables/widgets/useDropdownComboWidget.ts +++ b/src/composables/widgets/useDropdownComboWidget.ts @@ -50,9 +50,9 @@ export const useDropdownComboWidget = ( }, // Optional: minimum height for the widget (dropdown needs minimal height) - getMinHeight: () => 48, + getMinHeight: () => 32, // Lock maximum height to prevent oversizing - getMaxHeight: () => 64, + getMaxHeight: () => 48, // Optional: whether to serialize this widget's value serialize: true