fix: legible inline cell editing + no soft-wrap in args box

- Cell editors in env/header tables got the global QLineEdit style
  (6px vertical padding, 7px radius) crammed into a short row, clipping
  the text to an unreadable sliver. Give table editors a compact flat
  style and bump default row height to 34px.
- Editor select-all now uses dim-orange/white selection colors inside
  cells for contrast against the dark field.
- Arguments box no longer soft-wraps: one arg per line means a wrapped
  path looks like two args. Long lines scroll horizontally instead.
This commit is contained in:
AJ
2026-07-01 23:58:06 -04:00
parent a02d2abe49
commit d2f7ce112c
+12
View File
@@ -85,6 +85,13 @@ QTableWidget {{ background: {PANEL}; border: 1px solid {BORDER}; border-radius:
gridline-color: transparent; outline: none; }}
QTableWidget::item {{ padding: 6px 8px; border: none; }}
QTableWidget::item:selected {{ background: {ACCENT}; color: #1a1205; }}
/* Inline cell editors: the global QLineEdit padding/radius clips the text
inside a table row, so give editors a compact, flat style instead. */
QTableWidget QLineEdit {{
background: {PANEL_2}; color: {TEXT}; border: 1px solid {ACCENT};
border-radius: 3px; padding: 0px 4px; margin: 0px;
selection-background-color: {ACCENT_DIM}; selection-color: #ffffff;
}}
QHeaderView::section {{ background: {PANEL}; color: {MUTED}; border: none;
border-bottom: 1px solid {BORDER}; padding: 8px; font-weight: 600; }}
QScrollBar:vertical {{ background: transparent; width: 10px; margin: 2px; }}
@@ -139,6 +146,8 @@ class KeyValueTable(QWidget):
self.table.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeMode.Stretch)
self.table.horizontalHeader().setSectionResizeMode(1, QHeaderView.ResizeMode.Stretch)
self.table.verticalHeader().setVisible(False)
# Rows tall enough that the inline editor doesn't crush the text.
self.table.verticalHeader().setDefaultSectionSize(34)
self.table.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
self.table.setMinimumHeight(90)
self.table.itemChanged.connect(self._changed)
@@ -357,6 +366,9 @@ class ServerEditor(QFrame):
"-y\n@modelcontextprotocol/server-filesystem\n/Users/you/Documents"
)
self.args.setMinimumHeight(70)
# One argument per line means wrapping is actively misleading — a long
# path that soft-wraps looks like two separate args. Scroll instead.
self.args.setLineWrapMode(QPlainTextEdit.LineWrapMode.NoWrap)
self.args.textChanged.connect(self._emit)
v.addWidget(self.args, 1)
v.addWidget(self._lbl("Environment variables"))