创建按钮区域
(self, parent_layout)
| 186 | self.patch_mode_combo.setCurrentIndex(current_index) |
| 187 | |
| 188 | def _create_buttons_section(self, parent_layout): |
| 189 | """创建按钮区域""" |
| 190 | # 主要操作按钮 |
| 191 | self.run_all_btn = ModernButton(get_text("buttons.run_all"), "primary") |
| 192 | self.run_all_btn.setMaximumHeight(40) # 减少高度使布局更紧凑 |
| 193 | parent_layout.addWidget(self.run_all_btn) |
| 194 | |
| 195 | # 基础工具按钮组 - 使用水平布局 |
| 196 | basic_tools_frame = SectionFrame() |
| 197 | basic_tools_layout = QHBoxLayout(basic_tools_frame) |
| 198 | basic_tools_layout.setSpacing(15) # 增加间距从10到15 |
| 199 | basic_tools_layout.setContentsMargins(10, 4, 10, 4) # 进一步减少内边距 |
| 200 | |
| 201 | # 关闭IDE按钮 |
| 202 | self.close_ide_btn = ModernButton(get_text("buttons.close_ide"), "warning") |
| 203 | self.close_ide_btn.setMaximumHeight(35) # 减少高度使布局更紧凑 |
| 204 | self.close_ide_btn.setMinimumWidth(180) # 大幅增加最小宽度以适应英文 |
| 205 | basic_tools_layout.addWidget(self.close_ide_btn) |
| 206 | |
| 207 | # 清理数据库按钮 |
| 208 | self.clean_db_btn = ModernButton(get_text("buttons.clean_db"), "secondary") |
| 209 | self.clean_db_btn.setMaximumHeight(35) |
| 210 | self.clean_db_btn.setMinimumWidth(180) # 大幅增加最小宽度以适应英文 |
| 211 | basic_tools_layout.addWidget(self.clean_db_btn) |
| 212 | |
| 213 | # 修改遥测ID按钮 |
| 214 | self.modify_ids_btn = ModernButton(get_text("buttons.modify_ids"), "secondary") |
| 215 | self.modify_ids_btn.setMaximumHeight(35) |
| 216 | self.modify_ids_btn.setMinimumWidth(180) # 大幅增加最小宽度以适应英文 |
| 217 | basic_tools_layout.addWidget(self.modify_ids_btn) |
| 218 | |
| 219 | parent_layout.addWidget(basic_tools_frame) |
| 220 | |
| 221 | # 代码补丁区域 |
| 222 | self._create_patch_section(parent_layout) |
| 223 | |
| 224 | def _create_patch_section(self, parent_layout): |
| 225 | """创建代码补丁区域""" |
no test coverage detected