|
28 | 28 | QToolButton, |
29 | 29 | QStatusBar, |
30 | 30 | QWidget, |
31 | | - QFrame, |
32 | 31 | QSplitter, |
33 | 32 | ) |
34 | 33 |
|
@@ -195,57 +194,11 @@ def _find(cls, name: str): |
195 | 194 | self.status_hint = self.statusbar.findChild(QLabel, "status_hint") if self.statusbar else None |
196 | 195 | except Exception: |
197 | 196 | self.status_hint = None |
198 | | - try: |
199 | | - if self.log is not None: |
200 | | - self.log.setReadOnly(True) |
201 | | - self.log.setAcceptRichText(False) |
202 | | - except Exception: |
203 | | - pass |
204 | 197 | _setup_status_bar(self) |
205 | 198 |
|
206 | 199 |
|
207 | 200 | def _tune_ide_like_layout(self) -> None: |
208 | | - """Relax tight layout constraints in the IDE-like UI for better label fit.""" |
209 | | - header = self.ui.findChild(QFrame, "header") |
210 | | - if header is not None: |
211 | | - try: |
212 | | - header.setMinimumHeight(48) |
213 | | - header.setMaximumHeight(56) |
214 | | - except Exception: |
215 | | - pass |
216 | | - |
217 | | - for btn_name in ("compile_btn", "cancel_btn"): |
218 | | - btn = getattr(self, btn_name, None) |
219 | | - if btn is None: |
220 | | - continue |
221 | | - try: |
222 | | - btn.setMinimumSize(124, 34) |
223 | | - except Exception: |
224 | | - pass |
225 | | - |
226 | | - workspace_panel = self.ui.findChild(QFrame, "workspace_panel") |
227 | | - if workspace_panel is not None: |
228 | | - try: |
229 | | - workspace_panel.setMinimumWidth(280) |
230 | | - workspace_panel.setMaximumWidth(400) |
231 | | - except Exception: |
232 | | - pass |
233 | | - |
234 | | - tools_panel = self.ui.findChild(QFrame, "tools_panel") |
235 | | - if tools_panel is not None: |
236 | | - try: |
237 | | - tools_panel.setMinimumWidth(200) |
238 | | - tools_panel.setMaximumWidth(280) |
239 | | - except Exception: |
240 | | - pass |
241 | | - |
242 | | - logs_panel = self.ui.findChild(QFrame, "logs_panel") |
243 | | - if logs_panel is not None: |
244 | | - try: |
245 | | - logs_panel.setMinimumHeight(190) |
246 | | - logs_panel.setMaximumHeight(320) |
247 | | - except Exception: |
248 | | - pass |
| 201 | + """Apply runtime splitter ratios; static constraints live in the .ui file.""" |
249 | 202 |
|
250 | 203 | main_splitter = self.ui.findChild(QSplitter, "mainSplitter") |
251 | 204 | if main_splitter is not None: |
@@ -507,6 +460,36 @@ def _apply_activity_buttons_theme(self) -> None: |
507 | 460 | "QToolButton::menu-indicator { image: none; width: 0px; }" |
508 | 461 | ) |
509 | 462 |
|
| 463 | + # Keep IDE activity icons in sync with current theme-colored SVGs. |
| 464 | + try: |
| 465 | + from ..UiConnection import themed_svg_icon |
| 466 | + |
| 467 | + base = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) |
| 468 | + icons_dir = os.path.join(base, "icons") |
| 469 | + |
| 470 | + more_btn = getattr(self, "toolButton_more", None) |
| 471 | + if more_btn is not None: |
| 472 | + more_icon = themed_svg_icon( |
| 473 | + os.path.join(icons_dir, "more-horizontal.svg"), size=18 |
| 474 | + ) |
| 475 | + if more_icon is not None and not more_icon.isNull(): |
| 476 | + more_btn.setIcon(more_icon) |
| 477 | + more_btn.setIconSize(more_btn.iconSize()) |
| 478 | + more_btn.setText("") |
| 479 | + |
| 480 | + deps_btn = getattr(self, "activity_btn_deps", None) |
| 481 | + src_btn = getattr(self, "btn_suggest_deps", None) |
| 482 | + if deps_btn is not None: |
| 483 | + if src_btn is not None and src_btn.icon() is not None and not src_btn.icon().isNull(): |
| 484 | + deps_btn.setIcon(src_btn.icon()) |
| 485 | + deps_btn.setIconSize(src_btn.iconSize()) |
| 486 | + else: |
| 487 | + deps_icon = themed_svg_icon(os.path.join(icons_dir, "search.svg"), size=18) |
| 488 | + if deps_icon is not None and not deps_icon.isNull(): |
| 489 | + deps_btn.setIcon(deps_icon) |
| 490 | + except Exception: |
| 491 | + pass |
| 492 | + |
510 | 493 | for attr in ("toolButton_more", "activity_btn_deps"): |
511 | 494 | btn = getattr(self, attr, None) |
512 | 495 | if btn is None: |
|
0 commit comments