fix: resizable plugins dialog

This commit is contained in:
Ian Chua
2026-07-14 15:13:10 +08:00
parent 06cd8ad0d5
commit 3daa4336e3
5 changed files with 150 additions and 5 deletions

View File

@@ -151,11 +151,13 @@ body {
margin-right: auto;
}
/* Split pane: the list keeps --plugin-list-height of the dialog's content height (set by the
splitter drag, see InitPaneSplitter), the details pane takes what is left. Both panes shrink
before the layout overflows, so a short dialog degrades instead of clipping. */
.content {
min-height: 0;
display: grid;
grid-template-rows: minmax(220px, 1fr) 280px;
gap: 8px;
display: flex;
flex-direction: column;
}
.pane {
@@ -166,17 +168,60 @@ body {
display: grid;
}
/* The pane minimums live in JS (SPLIT_MIN_LIST_PX / SPLIT_MIN_DETAILS_PX), which clamps the ratio
against the current height: as CSS min-heights they could not both be honored in a very short
dialog and the panes would overflow instead of shrinking. */
.plugin-list-pane {
flex: 0 1 auto;
height: var(--plugin-list-height, 62%);
grid-template-rows: auto minmax(0, 1fr);
}
/* basis 0, so the details pane takes the space the list leaves instead of letting its own content
height push back and shrink the list below --plugin-list-height. */
.details-pane {
flex: 1 1 0;
grid-template-rows: auto minmax(0, 1fr);
padding: 12px;
box-sizing: border-box;
gap: 10px;
}
/* 9px of grab area for a 2px divider: the strip also supplies the gap between the panes. */
.pane-splitter {
flex: 0 0 auto;
position: relative;
height: 9px;
cursor: ns-resize;
touch-action: none;
}
.pane-splitter::after {
content: "";
position: absolute;
top: 50%;
right: 0;
left: 0;
height: 2px;
transform: translateY(-50%);
border-radius: 1px;
background: transparent;
transition: background-color 0.12s ease;
}
.pane-splitter:hover::after {
background: var(--border-strong);
}
.pane-splitter.dragging::after {
background: var(--row-selected-outline);
}
/* Keep the resize cursor for the whole drag, wherever the pointer travels. */
body.pane-resizing {
cursor: ns-resize;
}
.hdr {
font-weight: 600;
font-size: 12px;