2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
e139816db0 Fix Efficient Loader UI layout issue with font size changes
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
2026-02-03 23:09:29 +00:00
copilot-swe-agent[bot]
e4e93074fe Initial plan 2026-02-03 22:59:20 +00:00
2 changed files with 11 additions and 9 deletions

View File

@@ -117,10 +117,7 @@ class SeedControl {
this.updateButtonLabel();
}
// Don't update the widget value to maintain -1 in the UI when seed was special
if (!this.serializedCtx.wasSpecial) {
this.seedWidget.value = this.serializedCtx.seedUsed;
}
this.seedWidget.value = this.serializedCtx.seedUsed;
if (this.serializedCtx.wasSpecial) {
this.lastSeed = this.serializedCtx.seedUsed;
@@ -136,8 +133,12 @@ class SeedControl {
return; // Exit the function immediately
}
// Update lastSeed if user manually changed the seed to a specific value
if (!this.serializedCtx.wasSpecial && this.seedWidget.value !== -1) {
if (this.serializedCtx.wasSpecial) {
this.seedWidget.value = -1;
}
// Check if seed has changed to a non -1 value, and if so, update lastSeed
if (this.seedWidget.value !== -1) {
this.lastSeed = this.seedWidget.value;
}

View File

@@ -36,7 +36,6 @@ function toggleWidget(node, widget, show = false, suffix = "") {
node.setSize([node.size[0], newHeight]);
}
const WIDGET_HEIGHT = 24;
// Use for Multiline Widget Nodes (aka Efficient Loaders)
function toggleWidget_2(node, widget, show = false, suffix = "") {
if (!widget || doesInputWithNameExist(node, widget.name)) return;
@@ -52,8 +51,10 @@ function toggleWidget_2(node, widget, show = false, suffix = "") {
widget.computeSize = show ? origProps[widget.name].origComputeSize : () => [0, -4];
if (initialized){
const adjustment = show ? WIDGET_HEIGHT : -WIDGET_HEIGHT;
node.setSize([node.size[0], node.size[1] + adjustment]);
// Calculate the new height for the node based on its computeSize method
// This properly accounts for font size changes and ensures widgets don't overlap
const newHeight = node.computeSize()[1];
node.setSize([node.size[0], newHeight]);
}
}