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"))