Skip to content

Commit dc53d5b

Browse files
committed
refactor(AutoDevInputSection): group left components in panel
Replace individual addToLeft calls with a single FlowLayout panel to better organize the customAgent and modelSelector components layout
1 parent 520931b commit dc53d5b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/AutoDevInputSection.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,11 @@ class AutoDevInputSection(
223223
}
224224

225225
input.minimumSize = Dimension(input.minimumSize.width, 64)
226-
layoutPanel.addToLeft(customAgent)
227-
layoutPanel.addToLeft(Box.createHorizontalStrut(JBUI.scale(8)))
228-
layoutPanel.addToLeft(modelSelector)
226+
val leftPanel = JPanel(FlowLayout(FlowLayout.LEFT, 0, 0))
227+
leftPanel.add(customAgent)
228+
leftPanel.add(Box.createHorizontalStrut(JBUI.scale(8)))
229+
leftPanel.add(modelSelector)
230+
layoutPanel.addToLeft(leftPanel)
229231
} else {
230232
layoutPanel.addToLeft(modelSelector)
231233
}

0 commit comments

Comments
 (0)