From d2f7ce112ca72842b5075bad21834a9bed22681e Mon Sep 17 00:00:00 2001 From: AJ Date: Wed, 1 Jul 2026 23:58:06 -0400 Subject: [PATCH] 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. --- bcc.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bcc.py b/bcc.py index ab4d1c5..f5096b5 100644 --- a/bcc.py +++ b/bcc.py @@ -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"))