ms-components 0.5.8__tar.gz → 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. {ms_components-0.5.8 → ms_components-0.7.0}/PKG-INFO +1 -1
  2. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/base.qss +3 -3
  3. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/chips.py +11 -1
  4. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_dockwidget/widget.py +20 -1
  5. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/bridge.py +5 -1
  6. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/detail.py +30 -14
  7. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/jobs.py +7 -2
  8. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/models.py +11 -0
  9. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/polling.py +17 -0
  10. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_projects/browser.py +36 -16
  11. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_projects/widget.py +2 -2
  12. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/widget.py +7 -5
  13. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/action_header.py +2 -2
  14. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/pagination_control.py +1 -1
  15. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/smart_table_view.py +2 -2
  16. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/table_config.py +5 -0
  17. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/table_model.py +5 -0
  18. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components.egg-info/PKG-INFO +1 -1
  19. ms_components-0.7.0/src/ms_components.egg-info/scm_version.json +8 -0
  20. ms_components-0.7.0/tests/test_chips.py +81 -0
  21. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_dock_window.py +30 -0
  22. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_molsuite_monitor_bridge.py +22 -0
  23. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_molsuite_monitor_widgets.py +30 -0
  24. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_ms_projects_widget.py +30 -0
  25. ms_components-0.5.8/src/ms_components.egg-info/scm_version.json +0 -8
  26. ms_components-0.5.8/tests/test_chips.py +0 -16
  27. {ms_components-0.5.8 → ms_components-0.7.0}/.github/workflows/docs.yml +0 -0
  28. {ms_components-0.5.8 → ms_components-0.7.0}/.github/workflows/publish.yml +0 -0
  29. {ms_components-0.5.8 → ms_components-0.7.0}/.gitignore +0 -0
  30. {ms_components-0.5.8 → ms_components-0.7.0}/LICENSE +0 -0
  31. {ms_components-0.5.8 → ms_components-0.7.0}/MANIFEST.in +0 -0
  32. {ms_components-0.5.8 → ms_components-0.7.0}/README.md +0 -0
  33. {ms_components-0.5.8 → ms_components-0.7.0}/examples/tutorial_demo.py +0 -0
  34. {ms_components-0.5.8 → ms_components-0.7.0}/examples/tutorial_demo.toml +0 -0
  35. {ms_components-0.5.8 → ms_components-0.7.0}/licenses/lucide-LICENSE.txt +0 -0
  36. {ms_components-0.5.8 → ms_components-0.7.0}/licenses/qt-themes-LICENSE.txt +0 -0
  37. {ms_components-0.5.8 → ms_components-0.7.0}/pyproject.toml +0 -0
  38. {ms_components-0.5.8 → ms_components-0.7.0}/setup.cfg +0 -0
  39. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/__init__.py +0 -0
  40. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/backdrop.py +0 -0
  41. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ketcher.py +0 -0
  42. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/labels.py +0 -0
  43. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/listview.py +0 -0
  44. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_dockwidget/__init__.py +0 -0
  45. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_dockwidget/resources/__init__.py +0 -0
  46. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_dockwidget/resources/icons/__init__.py +0 -0
  47. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_dockwidget/resources/icons/folder.svg +0 -0
  48. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_executors.py +0 -0
  49. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/__init__.py +0 -0
  50. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/config.py +0 -0
  51. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/formatting.py +0 -0
  52. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/icons/cpu.svg +0 -0
  53. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/icons/gpu.svg +0 -0
  54. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/icons/memory.svg +0 -0
  55. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/palette.py +0 -0
  56. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/resources.py +0 -0
  57. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_monitor/widget.py +0 -0
  58. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_projects/__init__.py +0 -0
  59. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_projects/app.py +0 -0
  60. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_projects/backend.py +0 -0
  61. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_projects/scratch.py +0 -0
  62. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/__init__.py +0 -0
  63. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/command_line.py +0 -0
  64. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/actions.svg +0 -0
  65. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/box.svg +0 -0
  66. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/center.svg +0 -0
  67. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/display.svg +0 -0
  68. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/export.svg +0 -0
  69. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/hide.svg +0 -0
  70. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/hydrogens-polar.svg +0 -0
  71. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/hydrogens.svg +0 -0
  72. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/menu.svg +0 -0
  73. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/orient.svg +0 -0
  74. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/presets.svg +0 -0
  75. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/rock.svg +0 -0
  76. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/save.svg +0 -0
  77. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/selection.svg +0 -0
  78. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/settings.svg +0 -0
  79. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/style.svg +0 -0
  80. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/icons/zoom.svg +0 -0
  81. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/plugins.py +0 -0
  82. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_pymol/scene.py +0 -0
  83. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_settings/__init__.py +0 -0
  84. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_settings/panel.py +0 -0
  85. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_stepper.py +0 -0
  86. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/__init__.py +0 -0
  87. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/cell_delegate.py +0 -0
  88. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/column_panel.py +0 -0
  89. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/example_usage.py +0 -0
  90. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/filter_panel.py +0 -0
  91. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/columns.svg +0 -0
  92. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/export.svg +0 -0
  93. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/filter.svg +0 -0
  94. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/menu.svg +0 -0
  95. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/reload.svg +0 -0
  96. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/search.svg +0 -0
  97. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/settings.svg +0 -0
  98. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/sort-asc.svg +0 -0
  99. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/sort-desc.svg +0 -0
  100. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/icons/sort.svg +0 -0
  101. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/metric_filter_bar.py +0 -0
  102. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/query_builder.py +0 -0
  103. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/session_provider.py +0 -0
  104. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/sort_panel.py +0 -0
  105. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/table_interaction.py +0 -0
  106. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/test_external_filters.py +0 -0
  107. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_table/test_toolbar.py +0 -0
  108. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_tutorial/__init__.py +0 -0
  109. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_tutorial/bindings.py +0 -0
  110. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_tutorial/controller.py +0 -0
  111. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_tutorial/models.py +0 -0
  112. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/ms_tutorial/overlay.py +0 -0
  113. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/opengl.py +0 -0
  114. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/pagination.py +0 -0
  115. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/palettes.py +0 -0
  116. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/step_dialog.py +0 -0
  117. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/theme.py +0 -0
  118. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/tool_panel.py +0 -0
  119. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components/wheel.py +0 -0
  120. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components.egg-info/SOURCES.txt +0 -0
  121. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components.egg-info/dependency_links.txt +0 -0
  122. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components.egg-info/requires.txt +0 -0
  123. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components.egg-info/scm_file_list.json +0 -0
  124. {ms_components-0.5.8 → ms_components-0.7.0}/src/ms_components.egg-info/top_level.txt +0 -0
  125. {ms_components-0.5.8 → ms_components-0.7.0}/tests/conftest.py +0 -0
  126. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_app_settings.py +0 -0
  127. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_executors_ui.py +0 -0
  128. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_ketcher.py +0 -0
  129. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_monitor_config.py +0 -0
  130. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_opengl.py +0 -0
  131. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_optional_integrations.py +0 -0
  132. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_progress_column.py +0 -0
  133. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_project_browser.py +0 -0
  134. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_pymol_command_line.py +0 -0
  135. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_pymol_grid.py +0 -0
  136. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_pymol_scene.py +0 -0
  137. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_pymol_toolbar.py +0 -0
  138. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_query_builder_keyset.py +0 -0
  139. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_shift_hscroll.py +0 -0
  140. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_split_button_style.py +0 -0
  141. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_step_dialog.py +0 -0
  142. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_table_autofill_lifecycle.py +0 -0
  143. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_table_interaction.py +0 -0
  144. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_table_toolbar.py +0 -0
  145. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_table_view_state.py +0 -0
  146. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_theme_contrast.py +0 -0
  147. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_theme_menu.py +0 -0
  148. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_tool_panel.py +0 -0
  149. {ms_components-0.5.8 → ms_components-0.7.0}/tests/test_tutorial.py +0 -0
  150. {ms_components-0.5.8 → ms_components-0.7.0}/zensical.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ms_components
3
- Version: 0.5.8
3
+ Version: 0.7.0
4
4
  Summary: PySide6 UI components for MolSuite: smart table, project browser, job monitor, PyMOL dock, steppers.
5
5
  Author: Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco
6
6
  License-Expression: MIT
@@ -295,9 +295,9 @@ QLabel#PymolSceneContext {
295
295
  color: palette(placeholder-text);
296
296
  }
297
297
 
298
- /* Botón de extensión de las toolbars embebidas. Los componentes le asignan un
299
- SVG hamburguesa y abren su menú al entrar con el cursor. La regla va al final
300
- para vencer la especificidad de las reglas particulares de cada toolbar. */
298
+ /* Overflow (extension) button of the embedded toolbars. Components give it a
299
+ hamburger SVG and open its menu when the cursor enters. The rule comes last
300
+ to win over the specificity of each toolbar's own rules. */
301
301
  QToolButton#qt_toolbar_ext_button,
302
302
  #SmartTableToolbar QToolButton#qt_toolbar_ext_button,
303
303
  #PymolControlBar QToolButton#qt_toolbar_ext_button {
@@ -122,13 +122,20 @@ class ChipsSelect(QWidget):
122
122
  if editable:
123
123
  self._combo.setEditable(True)
124
124
  self._combo.setInsertPolicy(QComboBox.InsertPolicy.NoInsert)
125
- self._combo.lineEdit().setPlaceholderText("+ type")
125
+ self._combo.lineEdit().setPlaceholderText("+ Add")
126
+ self._combo.lineEdit().setAlignment(Qt.AlignmentFlag.AlignCenter)
126
127
  self._combo.lineEdit().returnPressed.connect(self._on_typed)
127
128
  self._combo.currentIndexChanged.connect(self._on_add)
128
129
  layout.addWidget(self._combo, 0, Qt.AlignmentFlag.AlignTop)
129
130
  self._options: list[str] = []
130
131
  self._selected: list[str] = []
131
132
  self._last_height = 0
133
+ # Enter in the typed field means "add this chip". QLineEdit emits returnPressed and then
134
+ # *ignores* the key, which hands it up the parent chain to a dialog that clicks its
135
+ # default button - an import submitted mid-edit. The key passes through the combo on its
136
+ # way up, so the combo is where it stops.
137
+ if editable:
138
+ self._combo.installEventFilter(self)
132
139
 
133
140
  def sizeHint(self) -> QSize:
134
141
  # The table sizes rows from the cell widget's sizeHint, so report the wrapped height.
@@ -228,6 +235,9 @@ class ChipsSelect(QWidget):
228
235
  # --- Drag a chip onto another to reorder ------------------------------------------
229
236
  def eventFilter(self, chip, event) -> bool:
230
237
  kind = event.type()
238
+ if chip is self._combo:
239
+ # Only ever installed on an editable combo: see __init__.
240
+ return kind == QEvent.Type.KeyPress and event.key() in (Qt.Key.Key_Return, Qt.Key.Key_Enter)
231
241
  if kind == QEvent.Type.MouseButtonPress and event.button() == Qt.MouseButton.LeftButton:
232
242
  self._press = event.position().toPoint()
233
243
  elif kind == QEvent.Type.MouseMove and self._press is not None:
@@ -3,7 +3,7 @@ from dataclasses import dataclass
3
3
  from enum import Enum, auto
4
4
  from typing import Dict, List, Optional
5
5
 
6
- from PySide6.QtCore import Qt, QSize, QMimeData, QPoint, QByteArray, QObject, QEvent, QTimer, QtMsgType, \
6
+ from PySide6.QtCore import Qt, QSize, QMimeData, QPoint, QRect, QByteArray, QObject, QEvent, QTimer, QtMsgType, \
7
7
  qInstallMessageHandler
8
8
  from PySide6.QtGui import QAction, QDrag, QIcon
9
9
  from PySide6.QtWidgets import (QDockWidget, QFrame, QMainWindow, QMenu, QSizePolicy, QToolBar, QToolButton, QVBoxLayout,
@@ -795,6 +795,7 @@ class DockManager:
795
795
  # the region it came from. This lets users keep (for example) PyMOL on a
796
796
  # second monitor while opening another tool in the original side panel.
797
797
  self._windowed: set[str] = set()
798
+ self._window_geometry: dict[str, QRect] = {} # where each window was when docked back
798
799
 
799
800
  # ── FIX P2: single flag that blocks ALL reactive handlers ──
800
801
  # While True, _on_dock_visibility_changed and
@@ -991,9 +992,25 @@ class DockManager:
991
992
  self._windowed.add(dock_id)
992
993
  self._remove_region_visible(entry.region, dock_id)
993
994
  self._make_native_window(dock_id)
995
+ dock.setGeometry(self._window_geometry.get(dock_id) or self._default_window_geometry(dock))
994
996
  QTimer.singleShot(0, dock.activateWindow)
995
997
  self.sync_buttons()
996
998
 
999
+ WINDOW_SCREEN_FRACTION = (0.6, 0.7) # width, height of the available screen
1000
+
1001
+ def _default_window_geometry(self, dock: QWidget) -> QRect:
1002
+ """A first-time window: a good share of the main window's screen, centred on it, and
1003
+ never narrower than its contents ask for (a toolbar with every action showing). The
1004
+ docked size is a strip of the main window, too small to work in on its own."""
1005
+ screen = (self.mw.screen() or QApplication.primaryScreen()).availableGeometry()
1006
+ fw, fh = self.WINDOW_SCREEN_FRACTION
1007
+ wanted = max(dock.width(), int(screen.width() * fw), dock.sizeHint().width())
1008
+ width = min(screen.width(), wanted)
1009
+ height = min(screen.height(), max(dock.height(), int(screen.height() * fh)))
1010
+ rect = QRect(0, 0, width, height)
1011
+ rect.moveCenter(screen.center())
1012
+ return rect
1013
+
997
1014
  def _make_native_window(self, dock_id: str) -> None:
998
1015
  """Detach directly, clearing any prior QDockWidget utility-window mode."""
999
1016
  dock = self.docks.get(dock_id)
@@ -1038,6 +1055,8 @@ class DockManager:
1038
1055
  if dock is None:
1039
1056
  return
1040
1057
  entry = self.entries[dock_id]
1058
+ if dock_id in self._windowed and dock.isWindow():
1059
+ self._window_geometry[dock_id] = dock.geometry() # reopens where the user left it
1041
1060
  self._updating = True
1042
1061
  try:
1043
1062
  self._windowed.discard(dock_id)
@@ -37,6 +37,7 @@ class MolSuiteMonitorBridge(QObject):
37
37
  resume=None,
38
38
  destinations=None,
39
39
  measure=None,
40
+ title=None,
40
41
  parent: QObject | None = None,
41
42
  ) -> None:
42
43
  """`resume(job_id, executor or None)` and `destinations(job_id) -> names` are for an
@@ -45,7 +46,9 @@ class MolSuiteMonitorBridge(QObject):
45
46
  `measure(job_id) -> {"done": int, "total": int, "unit": str} | None` is what the
46
47
  application counts in a job besides its chunks (the records a chunk holds, say): the
47
48
  monitor shows its rate in that unit. Called on the polling thread, every poll while the
48
- job runs and once after it ends; None for a job it does not measure."""
49
+ job runs and once after it ends; None for a job it does not measure.
50
+ `title(job_id, name) -> str | None` is what the application calls a job ("Docking ·
51
+ gnina", say), shown instead of its name; asked once a job, on the polling thread."""
49
52
  super().__init__(parent)
50
53
  self._workspace = workspace
51
54
  self._resume = resume or self._workspace_resume
@@ -58,6 +61,7 @@ class MolSuiteMonitorBridge(QObject):
58
61
  poll_ms=poll_ms,
59
62
  max_recent_jobs=max_recent_jobs,
60
63
  measure=measure,
64
+ title=title,
61
65
  )
62
66
  self._sync_state = MonitorSyncState()
63
67
  self._connect_poller(self._poller)
@@ -406,6 +406,7 @@ class JobDetail(QWidget):
406
406
  side_box.addWidget(self._tabs)
407
407
 
408
408
  self._tasks = QTreeWidget(side)
409
+ self._task_rows: list[tuple] = [] # what each row shows now, so a snapshot touches only what changed
409
410
  self._tasks.setHeaderLabels(["Input", "Host", "Attempt", "Elapsed", "Progress"])
410
411
  self._tasks.setRootIsDecorated(False)
411
412
  self._tasks.setUniformRowHeights(True)
@@ -466,6 +467,7 @@ class JobDetail(QWidget):
466
467
  self._bar.parts, self._trend.values = (0, 0, 0, 0), []
467
468
  self._show_grid(None)
468
469
  self._tasks.clear()
470
+ self._task_rows = []
469
471
  self._tabs.setTabText(self._tabs.indexOf(self._tasks), "Running")
470
472
  self._tab_meta.setText("")
471
473
  self.set_failures([], 0)
@@ -473,7 +475,8 @@ class JobDetail(QWidget):
473
475
  self._set_steps(None)
474
476
  return
475
477
  hue = status_color(job.status)
476
- self._name.setText(job.name or job.job_id[:8])
478
+ self._name.setText(job.label)
479
+ self._name.setToolTip(job.name if job.title else "")
477
480
  badge, badge_hue = badge_of(job)
478
481
  self._badge.setText(badge)
479
482
  self._badge.setToolTip(job.unreachable)
@@ -615,22 +618,35 @@ class JobDetail(QWidget):
615
618
  seconds=max(0.0, datetime.now().timestamp() - since))]
616
619
  median = statistics.median(task.seconds for task in tasks) if len(tasks) >= 3 else None
617
620
  warn = QColor(P["warn"])
618
- while self._tasks.topLevelItemCount() > len(tasks):
619
- self._tasks.takeTopLevelItem(self._tasks.topLevelItemCount() - 1)
620
- while self._tasks.topLevelItemCount() < len(tasks):
621
- self._tasks.addTopLevelItem(QTreeWidgetItem())
622
- slow = 0
623
- for at, task in enumerate(tasks):
624
- item = self._tasks.topLevelItem(at)
621
+ plain = self._tasks.palette().color(QPalette.ColorRole.Text)
622
+ rows, slow = [], 0
623
+ for task in tasks:
625
624
  what = task.input + (f" +{task.chunks - 1}" if task.chunks > 1 else "")
626
- for column, text in enumerate((what, task.host or "", str(task.attempt), format_duration(task.seconds),
627
- "—" if task.progress is None else f"{task.progress:.0f}%")):
628
- item.setText(column, text)
629
625
  late = median is not None and median > 0 and task.seconds > SLOW * median
630
626
  slow += late
631
- for column in range(5):
632
- item.setForeground(column, warn if late else self._tasks.palette().color(QPalette.ColorRole.Text))
633
- item.setToolTip(0, f"slow: {task.seconds / median:.1f}× the median" if late else task.input)
627
+ rows.append(((what, task.host or "", str(task.attempt), format_duration(task.seconds),
628
+ "—" if task.progress is None else f"{task.progress:.0f}%"),
629
+ warn if late else plain,
630
+ f"slow: {task.seconds / median:.1f}× the median" if late else task.input))
631
+ # Every Qt call from Python waits for the GIL, which the engine's threads keep busy on a
632
+ # big machine: rewrite only the cells that changed (mostly just the elapsed time).
633
+ while self._tasks.topLevelItemCount() > len(rows):
634
+ self._tasks.takeTopLevelItem(self._tasks.topLevelItemCount() - 1)
635
+ while self._tasks.topLevelItemCount() < len(rows):
636
+ self._tasks.addTopLevelItem(QTreeWidgetItem())
637
+ before = self._task_rows
638
+ for at, (texts, color, tip) in enumerate(rows):
639
+ item = self._tasks.topLevelItem(at)
640
+ old_texts, old_color, old_tip = before[at] if at < len(before) else ((None,) * 5, None, None)
641
+ for column, (text, old_text) in enumerate(zip(texts, old_texts)):
642
+ if text != old_text:
643
+ item.setText(column, text)
644
+ if color != old_color:
645
+ for column in range(5):
646
+ item.setForeground(column, color)
647
+ if tip != old_tip:
648
+ item.setToolTip(0, tip)
649
+ self._task_rows = rows
634
650
  self._tabs.setTabText(self._tabs.indexOf(self._tasks), f"Running {len(tasks)}" if tasks else "Running")
635
651
  said = [f"{len(tasks)} running"] if tasks else []
636
652
  if median is not None:
@@ -30,6 +30,9 @@ def status_color(status: str, default: str | None = None) -> str:
30
30
 
31
31
  def counts_label(job: JobMonitorState) -> str:
32
32
  """`done/total · time left`, or `· took` once it ended."""
33
+ if job.nothing_to_do:
34
+ took = (job.finished_at - job.started_at).total_seconds() if job.finished_at and job.started_at else None
35
+ return "0 chunks" + ("" if took is None else f" · took {format_duration(took)}")
33
36
  total = f"{job.chunks_total:,}" if job.chunks_total else "?"
34
37
  left = job.seconds_left
35
38
  if job.is_terminal:
@@ -50,6 +53,8 @@ def badge_of(job) -> tuple[str, str]:
50
53
  return "WAITING FOR HOST", P["warn"]
51
54
  if job.canceling and not job.is_terminal:
52
55
  return "CANCELING", P["warn"]
56
+ if job.nothing_to_do: # not a success with no work: there was nothing to run
57
+ return "NOTHING TO DO", P["text_muted"]
53
58
  return job.status.replace("_", " ").upper(), status_color(job.status)
54
59
 
55
60
 
@@ -178,7 +183,7 @@ class _JobRow(QStyledItemDelegate):
178
183
  failed_w = p.fontMetrics().horizontalAdvance(failed) if failed else 0
179
184
  p.setFont(font)
180
185
  room = brect.left() - x - 8 - failed_w
181
- name = p.fontMetrics().elidedText(job.name or job.job_id[:8], Qt.ElideRight, int(max(0, room)))
186
+ name = p.fontMetrics().elidedText(job.label, Qt.ElideRight, int(max(0, room)))
182
187
  p.setPen(text)
183
188
  p.drawText(QRectF(x, top, room, 18), Qt.AlignLeft | Qt.AlignVCenter, name)
184
189
  if failed:
@@ -298,7 +303,7 @@ class JobList(QListWidget):
298
303
  job = self.item(i).data(_ROLE)
299
304
  shown = (
300
305
  (self._status == "all" or job.status == self._status)
301
- and (not self._search or self._search in f"{job.name} {job.job_id} {job.status} {job.executor or ''}".lower())
306
+ and (not self._search or self._search in f"{job.label} {job.name} {job.job_id} {job.status} {job.executor or ''}".lower())
302
307
  and (self._executors is None or job.executor in self._executors)
303
308
  )
304
309
  self.item(i).setHidden(not shown)
@@ -38,6 +38,7 @@ class JobMonitorState:
38
38
  job_id: str # the key of the job in the project's journal
39
39
  engine_id: int | None = None # its id in this session's engine; None for a job of another session
40
40
  name: str = ""
41
+ title: str = "" # what the application calls it (`title(job_id, name)`); "" shows `name`
41
42
  executor: str | None = None # the name it was submitted to
42
43
  status: str = "waiting"
43
44
  error: str = ""
@@ -85,6 +86,16 @@ class JobMonitorState:
85
86
  def is_terminal(self) -> bool:
86
87
  return self.status in TERMINAL_JOB_STATUSES
87
88
 
89
+ @property
90
+ def nothing_to_do(self) -> bool:
91
+ """It completed without a chunk to run (its source had no work: everything was skipped)."""
92
+ return self.status == "completed" and not (self.chunks_total or self.chunks_settled)
93
+
94
+ @property
95
+ def label(self) -> str:
96
+ """What the monitor calls it: the application's title, else the job's name, else its key."""
97
+ return self.title or self.name or self.job_id[:8]
98
+
88
99
 
89
100
  @dataclass(slots=True)
90
101
  class JobDetailState:
@@ -87,11 +87,14 @@ class MolSuiteMonitorPoller(QObject):
87
87
  poll_ms: int = 500,
88
88
  max_recent_jobs: int = 20,
89
89
  measure=None,
90
+ title=None,
90
91
  parent: QObject | None = None,
91
92
  ) -> None:
92
93
  super().__init__(parent)
93
94
  self._workspace = workspace
94
95
  self._measure = measure
96
+ self._title = title
97
+ self._titles: dict[str, str] = {} # asked once a job: what it is does not change
95
98
  self._measured: dict[str, dict] = {} # the last word on a job that ended: asked no more
96
99
  # Only poll fast while jobs are active; back off hard when idle.
97
100
  self._active_poll_ms = max(100, poll_ms)
@@ -161,6 +164,18 @@ class MolSuiteMonitorPoller(QObject):
161
164
  self._last_snapshot = snapshot
162
165
  self.project_snapshot_updated.emit(snapshot)
163
166
 
167
+ def _apply_title(self, job: JobMonitorState) -> None:
168
+ """What the application calls `job`, from `title(job_id, name)`: asked once a job."""
169
+ if self._title is None:
170
+ return
171
+ if job.job_id not in self._titles:
172
+ try:
173
+ said = self._title(job.job_id, job.name)
174
+ except Exception: # noqa: BLE001 — a name of the application must never stop the monitor
175
+ said = None
176
+ self._titles[job.job_id] = str(said or "")
177
+ job.title = self._titles[job.job_id]
178
+
164
179
  def _apply_measure(self, job: JobMonitorState, now: float) -> None:
165
180
  """What the application counts in `job`, from `measure(job_id)`: `{"done", "total", "unit"}`
166
181
  or None. A job that ended is asked once more and then kept."""
@@ -195,7 +210,9 @@ class MolSuiteMonitorPoller(QObject):
195
210
  self._speeds.keep(job.job_id for job in jobs)
196
211
  shown = {job.job_id for job in jobs}
197
212
  self._measured = {job_id: said for job_id, said in self._measured.items() if job_id in shown}
213
+ self._titles = {job_id: said for job_id, said in self._titles.items() if job_id in shown}
198
214
  for job in jobs:
215
+ self._apply_title(job)
199
216
  self._apply_measure(job, now)
200
217
  self._speeds.apply(job, now)
201
218
  if job.job_id == self.selected and not job.is_terminal:
@@ -10,7 +10,7 @@ from PySide6.QtCore import (
10
10
  )
11
11
  from PySide6.QtGui import (
12
12
  QAction, QFont, QPainter, QColor, QPen, QBrush, QPainterPath, QMouseEvent,
13
- QKeySequence, QPalette, QShortcut,
13
+ QFontMetrics, QKeySequence, QPalette, QShortcut,
14
14
  )
15
15
  from PySide6.QtWidgets import (
16
16
  QAbstractItemView, QApplication, QComboBox, QDialog, QDialogButtonBox,
@@ -354,7 +354,10 @@ class ProjectItem:
354
354
 
355
355
  # ── ProjectTableModel ─────────────────────────────────────────────────────────
356
356
 
357
- _COL_NAME = 0 # avatar + name + id
357
+ # ISO: unambiguous ("10/11/2026" is October or November), and it sorts by date as text.
358
+ PROJECT_DATE_FORMAT = "%Y-%m-%d %H:%M"
359
+
360
+ _COL_NAME = 0 # avatar + name + tags
358
361
  _COL_META = 1 # description
359
362
  _COL_PATH = 2 # path (stretch)
360
363
  _COL_DATE = 3 # last_modified
@@ -366,7 +369,7 @@ _COL_COUNT = 6
366
369
  class ProjectTableModel(QAbstractTableModel):
367
370
  """All projects in memory. Scope/filter/search/sort are pure Python."""
368
371
 
369
- HEADERS = ["", "Description", "Modified", "Path", "", ""]
372
+ HEADERS = ["Name", "Description", "Path", "Modified", "", ""]
370
373
 
371
374
  def __init__(self, parent=None):
372
375
  super().__init__(parent)
@@ -561,6 +564,8 @@ class ProjectRowDelegate(QStyledItemDelegate):
561
564
  painter.setPen(QPen(palette.color(role)))
562
565
  painter.setFont(self._font(option.font, 9 if col == _COL_META else 8))
563
566
  text = index.data(Qt.DisplayRole) or ""
567
+ if col == _COL_PATH: # the full path is in the tooltip
568
+ text = painter.fontMetrics().elidedText(text, Qt.ElideMiddle, max(0, rect.width() - 12))
564
569
  flags = Qt.AlignLeft | Qt.AlignVCenter
565
570
  if col == _COL_META:
566
571
  flags = Qt.AlignLeft | Qt.TextWordWrap
@@ -600,17 +605,20 @@ class ProjectRowDelegate(QStyledItemDelegate):
600
605
  tx = av_x + self._AVATAR + 10
601
606
  painter.setFont(self._font(base_font, 11, QFont.Bold))
602
607
  painter.setPen(palette.color(QPalette.ColorRole.Text))
603
- painter.drawText(QRect(tx, rect.top()+8, rect.width()-tx-8, 20),
608
+ # The tags under the name, or the name alone, centred. The raw UUID that sat here told a
609
+ # user nothing; it stays in the name's tooltip.
610
+ tags = ", ".join(project.tags)
611
+ name_top = rect.top() + 8 if tags else rect.center().y() - 10
612
+ painter.drawText(QRect(tx, name_top, rect.width()-tx-8, 20),
604
613
  Qt.AlignLeft | Qt.AlignVCenter, project.name or "")
605
-
606
- # Project id
607
- painter.setFont(self._font(base_font, 8))
608
- painter.setPen(palette.color(QPalette.ColorRole.PlaceholderText))
609
- painter.drawText(
610
- QRect(tx, rect.top() + 30, rect.width() - tx - 8, 16),
611
- Qt.AlignLeft | Qt.AlignVCenter,
612
- f"ID: {project.id}",
613
- )
614
+ if tags:
615
+ painter.setFont(self._font(base_font, 8))
616
+ painter.setPen(palette.color(QPalette.ColorRole.PlaceholderText))
617
+ painter.drawText(
618
+ QRect(tx, rect.top() + 30, rect.width() - tx - 8, 16),
619
+ Qt.AlignLeft | Qt.AlignVCenter,
620
+ tags,
621
+ )
614
622
 
615
623
  @staticmethod
616
624
  def _font(base_font: QFont, point_size: int, weight: QFont.Weight | None = None) -> QFont:
@@ -798,7 +806,9 @@ class ProjectTreeWidget(QWidget):
798
806
  hdr.setSectionResizeMode(_COL_MENU, QHeaderView.Fixed)
799
807
  hdr.setStretchLastSection(False)
800
808
  hdr.resizeSection(_COL_NAME, 300)
801
- hdr.resizeSection(_COL_DATE, 100)
809
+ # As wide as a date in the row font (8 pt, see the delegate) plus its 6 px side padding.
810
+ date_font = ProjectRowDelegate._font(self.view.font(), 8)
811
+ hdr.resizeSection(_COL_DATE, QFontMetrics(date_font).horizontalAdvance("2026-12-31 23:59") + 16)
802
812
  hdr.resizeSection(_COL_STAR, 30)
803
813
  hdr.resizeSection(_COL_MENU, 30)
804
814
  hdr.setSortIndicatorShown(True)
@@ -1023,7 +1033,13 @@ class ProjectFormDialog(QDialog):
1023
1033
  self.name_input = QLineEdit(self.initial_data.get("name", ""))
1024
1034
  self.name_input.editingFinished.connect(lambda: self.name_committed.emit(self.name_input.text().strip()))
1025
1035
  self.path_input = QLineEdit(str(self.initial_data.get("path", "")))
1026
- self.path_input.setReadOnly(True)
1036
+ # A new project's folder can be typed or browsed; an existing one's cannot move, and the
1037
+ # field looks it (greyed like App) instead of a read-only box that ignores typing.
1038
+ self.path_input.setEnabled(not is_edit)
1039
+ self.path_input.setToolTip(
1040
+ "The project is stored in this folder." if is_edit else
1041
+ "Folder for the project: type or paste a path, or Browse. A folder named after the "
1042
+ "project is created inside it unless the path already ends with that name.")
1027
1043
  self.description_input = QTextEdit(self.initial_data.get("description", ""))
1028
1044
  self.description_input.setMinimumHeight(120)
1029
1045
  self.tags_input = QLineEdit(
@@ -1074,6 +1090,10 @@ class ProjectFormDialog(QDialog):
1074
1090
  if not self.path_input.text().strip():
1075
1091
  QMessageBox.warning(self, "Invalid data", "The path cannot be empty.")
1076
1092
  return
1093
+ if not Path(self.path_input.text().strip()).expanduser().is_absolute():
1094
+ QMessageBox.warning(self, "Invalid data",
1095
+ "The path must be a full folder path, e.g. ~/molsuite_projects.")
1096
+ return
1077
1097
  if self.app_combo.currentData() is None:
1078
1098
  QMessageBox.warning(self, "Invalid data", "You must select an app.")
1079
1099
  return
@@ -1156,7 +1176,7 @@ class ProjectBrowserPanel(QWidget):
1156
1176
  name = p.name,
1157
1177
  description = p.description or "",
1158
1178
  path = str(p.path),
1159
- last_modified= p.updated_at.strftime("%d/%m/%Y %H:%M"),
1179
+ last_modified= p.updated_at.strftime(PROJECT_DATE_FORMAT),
1160
1180
  app_id = (getattr(p, "app_id", "") or "").strip(),
1161
1181
  favorite = bool(p.favorite),
1162
1182
  language = self._manifest_name(p.app_id),
@@ -18,7 +18,7 @@ from PySide6.QtWidgets import (
18
18
  )
19
19
 
20
20
  from ms_components.ms_projects.backend import create_catalog_backend
21
- from ms_components.ms_projects.browser import ProjectFormDialog, ProjectItem, ProjectTreeWidget
21
+ from ms_components.ms_projects.browser import PROJECT_DATE_FORMAT, ProjectFormDialog, ProjectItem, ProjectTreeWidget
22
22
 
23
23
  if TYPE_CHECKING:
24
24
  from ms_flow.core.project.catalog import ProjectCatalogBackend
@@ -144,7 +144,7 @@ class ProjectsMenuWidget(QFrame):
144
144
  name=project.name,
145
145
  description=project.description or "",
146
146
  path=str(project.path),
147
- last_modified=project.updated_at.strftime("%d/%m/%Y %H:%M"),
147
+ last_modified=project.updated_at.strftime(PROJECT_DATE_FORMAT),
148
148
  app_id=(getattr(project, "app_id", "") or "").strip(),
149
149
  favorite=bool(project.favorite),
150
150
  language=self._manifest_name(project.app_id),
@@ -979,6 +979,7 @@ class PymolControlBar(QFrame):
979
979
 
980
980
  class PymolDockWidget(MSDockWidget):
981
981
  side_panel_visibility_changed = Signal(bool)
982
+ _VIEWER_MIN_WIDTH = 240
982
983
 
983
984
  def __init__(self, title: str, manager, parent=None):
984
985
  super().__init__(title, manager, parent)
@@ -1000,13 +1001,12 @@ class PymolDockWidget(MSDockWidget):
1000
1001
  self._side_panel_widget: QWidget | None = None
1001
1002
  self._splitter = QSplitter(Qt.Horizontal, self)
1002
1003
  self._splitter.setChildrenCollapsible(False)
1003
- # The side container has a 220px minimum and the viewer had none, so in a narrow dock
1004
- # the panel took everything and the 3D view vanished. Floor the viewer instead.
1005
- self.pymol_widget.setMinimumWidth(240)
1004
+ # Floor the viewer, or a narrow dock gives everything to the side panel and the 3D view
1005
+ # vanishes; while the panel is open the floor rises to the panel's own width.
1006
+ self.pymol_widget.setMinimumWidth(self._VIEWER_MIN_WIDTH)
1006
1007
  self._splitter.addWidget(self.pymol_widget)
1007
1008
 
1008
1009
  self._side_container = QWidget(self)
1009
- self._side_container.setMinimumWidth(220)
1010
1010
  self._side_container.setMaximumWidth(360)
1011
1011
  self._side_container.hide()
1012
1012
  self._side_layout = QVBoxLayout(self._side_container)
@@ -1094,6 +1094,8 @@ class PymolDockWidget(MSDockWidget):
1094
1094
  self._side_container.setVisible(visible)
1095
1095
  if self._side_panel_widget is not None:
1096
1096
  self._side_panel_widget.setVisible(visible)
1097
+ panel_width = self._side_container.minimumSizeHint().width() if visible else 0
1098
+ self.pymol_widget.setMinimumWidth(max(self._VIEWER_MIN_WIDTH, panel_width))
1097
1099
  if visible:
1098
1100
  self._splitter.setSizes([max(480, self.width() - 280), 280])
1099
1101
  else:
@@ -1102,7 +1104,7 @@ class PymolDockWidget(MSDockWidget):
1102
1104
  self.side_panel_visibility_changed.emit(visible)
1103
1105
 
1104
1106
  def is_side_panel_visible(self) -> bool:
1105
- return bool(self._side_container.isVisible())
1107
+ return not self._side_container.isHidden() # own state; isVisible() is False while the dock is hidden
1106
1108
 
1107
1109
  def eventFilter(self, watched, event):
1108
1110
  if watched is self.pymol_widget and event.type() == QEvent.Type.MouseButtonRelease:
@@ -36,7 +36,7 @@ _ICON_FILES: dict[str, str] = {
36
36
 
37
37
  @lru_cache(maxsize=128)
38
38
  def _svg_pixmap(name: str, color_hex: str, size: int, dpr: float) -> QPixmap:
39
- """SVG → QPixmap, recoloreado (currentColor → color_hex), cacheado."""
39
+ """SVG → QPixmap, recolored (currentColor → color_hex), cached."""
40
40
  svg = (_ICONS / _ICON_FILES[name]).read_bytes().replace(b"currentColor", color_hex.encode())
41
41
  renderer = QSvgRenderer(QByteArray(svg))
42
42
  actual = max(1, int(size * dpr))
@@ -348,7 +348,7 @@ class FilterPopup(QFrame):
348
348
  layout = QVBoxLayout(self)
349
349
  layout.setContentsMargins(10, 10, 10, 10)
350
350
  layout.setSpacing(8)
351
- layout.addWidget(QLabel(f"Filtrar {col_def.label}"))
351
+ layout.addWidget(QLabel(f"Filter {col_def.label}"))
352
352
 
353
353
  self._checkboxes: list[QCheckBox] = []
354
354
  self._op_combo: QComboBox | None = None
@@ -101,7 +101,7 @@ class PaginationControl(QWidget):
101
101
  layout.addItem(QSpacerItem(16, 0, QSizePolicy.Fixed, QSizePolicy.Minimum))
102
102
 
103
103
  # Items/page
104
- layout.addWidget(QLabel("Filas:"))
104
+ layout.addWidget(QLabel("Rows:"))
105
105
 
106
106
  self.items_per_page_combo = QComboBox()
107
107
  self.items_per_page_combo.setObjectName("PageSizeCombo")
@@ -355,7 +355,7 @@ class SmartTableView(QWidget):
355
355
  self._header = ActionHeader(self._config, self._table)
356
356
  self._table.setHorizontalHeader(self._header)
357
357
  self._header.setSectionResizeMode(QHeaderView.Interactive)
358
- self._header.setStretchLastSection(True)
358
+ self._header.setStretchLastSection(self._config.stretch_last_column)
359
359
  if self._config.allow_column_reorder:
360
360
  self._header.setSectionsMovable(True)
361
361
 
@@ -1161,7 +1161,7 @@ class SmartTableView(QWidget):
1161
1161
  if self._config.context_menu_actions:
1162
1162
  menu.addSeparator()
1163
1163
 
1164
- copy_action = menu.addAction("Copiar celda")
1164
+ copy_action = menu.addAction("Copy cell")
1165
1165
  copy_action.triggered.connect(lambda: self._copy_cell(index))
1166
1166
 
1167
1167
  copy_row_action = menu.addAction("Copy row")
@@ -105,6 +105,7 @@ class ColumnDef:
105
105
  formatter: Function (raw_value) → str used for display.
106
106
  delegate: Name of a custom Qt delegate (for editors).
107
107
  tooltip: Static tooltip, or callable(row_data) → str.
108
+ header_tooltip: Tooltip on the column header (what the column means).
108
109
  db_column: Override for the real DB column name (when it differs from field).
109
110
  expr: SQLAlchemy expression producing the column value, for anything
110
111
  that is not a model attribute (JSON_EXTRACT, CASE, func.*).
@@ -133,6 +134,7 @@ class ColumnDef:
133
134
  formatter: Optional[Callable] = None
134
135
  delegate: Optional[str] = None
135
136
  tooltip: Any = None # str | Callable
137
+ header_tooltip: Optional[str] = None
136
138
  db_column: Optional[str] = None
137
139
  expr: Any = None # SQLAlchemy ColumnElement
138
140
  progress_max: Optional[str] = None
@@ -315,6 +317,8 @@ class TableConfig:
315
317
  show_vertical_header: Show Qt's native vertical header.
316
318
  show_checkboxes: Show the selection checkbox column.
317
319
  alternating_rows: Alternate row colours.
320
+ stretch_last_column: The last column fills the table's spare width. Off, columns keep
321
+ their widths and the spare width stays empty.
318
322
  allow_column_reorder: The user may reorder columns by dragging.
319
323
  allow_column_resize: The user may resize columns.
320
324
  allow_row_resize: The user may resize row heights.
@@ -346,6 +350,7 @@ class TableConfig:
346
350
  show_vertical_header: bool = False
347
351
  show_checkboxes: bool = False
348
352
  alternating_rows: bool = True
353
+ stretch_last_column: bool = True
349
354
  allow_column_reorder: bool = True
350
355
  allow_column_resize: bool = True
351
356
  allow_row_resize: bool = False
@@ -193,6 +193,11 @@ class SmartTableModel(QAbstractTableModel):
193
193
  section -= 1
194
194
  if 0 <= section < len(self._visible_cols):
195
195
  return self._visible_cols[section].label
196
+ if role == Qt.ToolTipRole:
197
+ if self._config.show_row_numbers:
198
+ section -= 1
199
+ if 0 <= section < len(self._visible_cols):
200
+ return self._visible_cols[section].header_tooltip
196
201
  if role == Qt.TextAlignmentRole:
197
202
  return Qt.AlignCenter
198
203
  if role == Qt.FontRole:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ms_components
3
- Version: 0.5.8
3
+ Version: 0.7.0
4
4
  Summary: PySide6 UI components for MolSuite: smart table, project browser, job monitor, PyMOL dock, steppers.
5
5
  Author: Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco
6
6
  License-Expression: MIT
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.7.0",
3
+ "distance": 0,
4
+ "node": "ga2431bfb6f30f9560a4f94696120ebe35eb2c354",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-11-14"
8
+ }