Adjust Beat Prompt widget layout

This commit is contained in:
2026-08-27 06:54:48 +00:00
parent 5776019016
commit 4571ea9e31
+11 -1
View File
@@ -44,6 +44,11 @@ function injectCSS() {
.dh3bp-root {
box-sizing: border-box;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
overflow: auto;
pointer-events: auto;
color: #e8e8e8;
font: 12px/1.35 "Segoe UI", sans-serif;
padding: 8px 10px 10px;
@@ -75,6 +80,7 @@ function injectCSS() {
}
.dh3bp-list {
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: 10px;
}
@@ -516,8 +522,12 @@ function setupNode(node) {
setValue: () => {},
serialize: false,
getMinHeight: () => 180,
hideOnZoom: false,
});
widget.computeLayoutSize = () => ({
minHeight: Math.max(220, node.size?.[1] || DEFAULT_H),
minWidth: Math.max(MIN_W, node.size?.[0] || DEFAULT_W),
});
widget.computeLayoutSize = () => ({ minHeight: 180, minWidth: 1 });
applyAdaptiveCanvasOnly(widget);
node.size[0] = Math.max(node.size[0] || 0, DEFAULT_W);