Increase assertion row and widget heights for proper display
- Row height: 50px - Widget minimum heights: 34px - Button max height constrained to 34px - Table max height increased to 220px for taller rows Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0548f6e3ec
commit
70e9c7b789
|
|
@ -169,7 +169,7 @@ class TestStepDialog(QDialog):
|
||||||
self.assertions_table.setColumnWidth(0, 130)
|
self.assertions_table.setColumnWidth(0, 130)
|
||||||
self.assertions_table.setColumnWidth(2, 40)
|
self.assertions_table.setColumnWidth(2, 40)
|
||||||
self.assertions_table.verticalHeader().setVisible(False)
|
self.assertions_table.verticalHeader().setVisible(False)
|
||||||
self.assertions_table.setMaximumHeight(150)
|
self.assertions_table.setMaximumHeight(220)
|
||||||
assert_layout.addWidget(self.assertions_table)
|
assert_layout.addWidget(self.assertions_table)
|
||||||
|
|
||||||
# Add assertion button
|
# Add assertion button
|
||||||
|
|
@ -298,26 +298,30 @@ class TestStepDialog(QDialog):
|
||||||
row = self.assertions_table.rowCount()
|
row = self.assertions_table.rowCount()
|
||||||
self.assertions_table.insertRow(row)
|
self.assertions_table.insertRow(row)
|
||||||
|
|
||||||
# Set proper row height for widgets
|
# Set row height tall enough for widgets
|
||||||
self.assertions_table.setRowHeight(row, 40)
|
self.assertions_table.setRowHeight(row, 50)
|
||||||
|
|
||||||
# Type dropdown
|
# Type dropdown
|
||||||
type_combo = QComboBox()
|
type_combo = QComboBox()
|
||||||
type_combo.setMinimumWidth(120)
|
type_combo.setMinimumWidth(120)
|
||||||
self.assertions_table.setCellWidget(row, 0, type_combo)
|
type_combo.setMinimumHeight(34)
|
||||||
for type_id, display_name, tooltip in self.ASSERTION_TYPES:
|
for type_id, display_name, tooltip in self.ASSERTION_TYPES:
|
||||||
type_combo.addItem(display_name, type_id)
|
type_combo.addItem(display_name, type_id)
|
||||||
idx = type_combo.count() - 1
|
idx = type_combo.count() - 1
|
||||||
type_combo.setItemData(idx, tooltip, Qt.ToolTipRole)
|
type_combo.setItemData(idx, tooltip, Qt.ToolTipRole)
|
||||||
|
self.assertions_table.setCellWidget(row, 0, type_combo)
|
||||||
|
|
||||||
# Value input
|
# Value input
|
||||||
value_edit = QLineEdit()
|
value_edit = QLineEdit()
|
||||||
value_edit.setPlaceholderText("Expected value (if applicable)")
|
value_edit.setPlaceholderText("Expected value (if applicable)")
|
||||||
|
value_edit.setMinimumHeight(34)
|
||||||
self.assertions_table.setCellWidget(row, 1, value_edit)
|
self.assertions_table.setCellWidget(row, 1, value_edit)
|
||||||
|
|
||||||
# Remove button - red X for clear delete action
|
# Remove button - red X for clear delete action
|
||||||
btn_remove = QPushButton("✕")
|
btn_remove = QPushButton("✕")
|
||||||
btn_remove.setToolTip("Remove this assertion")
|
btn_remove.setToolTip("Remove this assertion")
|
||||||
|
btn_remove.setMinimumHeight(34)
|
||||||
|
btn_remove.setMaximumHeight(34)
|
||||||
btn_remove.setStyleSheet("""
|
btn_remove.setStyleSheet("""
|
||||||
QPushButton {
|
QPushButton {
|
||||||
background-color: #fed7d7;
|
background-color: #fed7d7;
|
||||||
|
|
@ -326,7 +330,6 @@ class TestStepDialog(QDialog):
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding: 4px 8px;
|
|
||||||
}
|
}
|
||||||
QPushButton:hover {
|
QPushButton:hover {
|
||||||
background-color: #feb2b2;
|
background-color: #feb2b2;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue