Improve Dependencies section layout in Tool Builder
- Make section compact (doesn't stretch to fill space) - Add stretch at bottom of left panel to push content up - Reduce list height slightly (80px max, 60px min) - Tighter margins and spacing - Simplified tooltip: "Declare tools called via subprocess in code steps. Tool steps are automatically included when saved." Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b0e8bb3e65
commit
be712ddc2e
|
|
@ -133,31 +133,31 @@ class ToolBuilderPage(QWidget):
|
||||||
|
|
||||||
left_layout.addWidget(args_box)
|
left_layout.addWidget(args_box)
|
||||||
|
|
||||||
# Dependencies group
|
# Dependencies group (compact - doesn't stretch)
|
||||||
deps_box = QGroupBox()
|
deps_box = QGroupBox()
|
||||||
deps_layout = QVBoxLayout(deps_box)
|
deps_layout = QVBoxLayout(deps_box)
|
||||||
|
deps_layout.setContentsMargins(9, 9, 9, 9)
|
||||||
|
deps_layout.setSpacing(8)
|
||||||
|
|
||||||
deps_label = QLabel("Dependencies")
|
deps_label = QLabel("Dependencies")
|
||||||
deps_label.setObjectName("sectionHeading")
|
deps_label.setObjectName("sectionHeading")
|
||||||
deps_label.setToolTip(
|
deps_label.setToolTip(
|
||||||
"<p>Dependencies are other CmdForge tools this tool requires.</p>"
|
"Declare tools called via subprocess in code steps. "
|
||||||
"<p>If your code steps call other tools via subprocess,<br>"
|
"Tool steps are automatically included when saved."
|
||||||
"declare them here so the dependency system knows about them.</p>"
|
|
||||||
"<p>Use this when you can't use a Tool step directly<br>"
|
|
||||||
"(e.g., calling tools in a loop or with complex logic).</p>"
|
|
||||||
)
|
)
|
||||||
deps_layout.addWidget(deps_label)
|
deps_layout.addWidget(deps_label)
|
||||||
|
|
||||||
self.deps_list = QListWidget()
|
self.deps_list = QListWidget()
|
||||||
self.deps_list.setMaximumHeight(100)
|
self.deps_list.setMaximumHeight(80)
|
||||||
|
self.deps_list.setMinimumHeight(60)
|
||||||
deps_layout.addWidget(self.deps_list)
|
deps_layout.addWidget(self.deps_list)
|
||||||
|
|
||||||
# Dependency add row: combo + add button
|
# Dependency add row: combo + add button
|
||||||
deps_add_row = QHBoxLayout()
|
deps_add_row = QHBoxLayout()
|
||||||
|
deps_add_row.setSpacing(6)
|
||||||
self.deps_combo = QComboBox()
|
self.deps_combo = QComboBox()
|
||||||
self.deps_combo.setEditable(True)
|
self.deps_combo.setEditable(True)
|
||||||
self.deps_combo.setPlaceholderText("Select or type tool name...")
|
self.deps_combo.setPlaceholderText("Select or type tool name...")
|
||||||
self.deps_combo.setToolTip("Select an installed tool or type a tool reference (e.g., official/summarize)")
|
|
||||||
self._populate_deps_combo()
|
self._populate_deps_combo()
|
||||||
deps_add_row.addWidget(self.deps_combo, 1)
|
deps_add_row.addWidget(self.deps_combo, 1)
|
||||||
|
|
||||||
|
|
@ -173,6 +173,7 @@ class ToolBuilderPage(QWidget):
|
||||||
deps_layout.addLayout(deps_add_row)
|
deps_layout.addLayout(deps_add_row)
|
||||||
|
|
||||||
left_layout.addWidget(deps_box)
|
left_layout.addWidget(deps_box)
|
||||||
|
left_layout.addStretch() # Push everything up, deps_box won't stretch
|
||||||
|
|
||||||
splitter.addWidget(left)
|
splitter.addWidget(left)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue