theme: upgrade palette from Catppuccin Mocha to Frappé
Replaces all dark-Mocha colours (#1e1e2e base, #313244 surface0, etc.) with the noticeably brighter Frappé variants (#303446 base, #414559 surface0, etc.) across the QSS and every hardcoded colour in Python source files (syntax highlighter, completer popup, log viewer, explain view, table viewer, schema browser, icons, etc.). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+11
-11
@@ -36,12 +36,12 @@ def _cost_color(val_str: str) -> QColor:
|
||||
try:
|
||||
v = float(str(val_str).replace(",", ""))
|
||||
except (ValueError, TypeError):
|
||||
return QColor("#cdd6f4") # neutral (Catppuccin text)
|
||||
return QColor("#c6d0f5") # neutral (Catppuccin text)
|
||||
if v <= 10:
|
||||
return QColor("#a6e3a1") # green — cheap
|
||||
return QColor("#a6d189") # green — cheap
|
||||
if v <= 1_000:
|
||||
return QColor("#f9e2af") # yellow — moderate
|
||||
return QColor("#f38ba8") # red — expensive
|
||||
return QColor("#e5c890") # yellow — moderate
|
||||
return QColor("#e78284") # red — expensive
|
||||
|
||||
|
||||
# ── Background worker ─────────────────────────────────────────────────────────
|
||||
@@ -101,9 +101,9 @@ def _build_mysql_tree(tree: QTreeWidget, cols: list, rows: list):
|
||||
good_types = {"const", "eq_ref", "ref", "system"}
|
||||
jt_lower = join_type.lower()
|
||||
if jt_lower in bad_types:
|
||||
item.setForeground(1, QBrush(QColor("#f38ba8")))
|
||||
item.setForeground(1, QBrush(QColor("#e78284")))
|
||||
elif jt_lower in good_types:
|
||||
item.setForeground(1, QBrush(QColor("#a6e3a1")))
|
||||
item.setForeground(1, QBrush(QColor("#a6d189")))
|
||||
|
||||
# Colour rows estimate
|
||||
item.setForeground(3, QBrush(_cost_color(est_rows)))
|
||||
@@ -203,9 +203,9 @@ def _build_sqlite_tree(tree: QTreeWidget, cols: list, rows: list):
|
||||
# Colour SCAN (bad) vs SEARCH/INDEX (good)
|
||||
detail_str = str(detail).upper()
|
||||
if "SCAN" in detail_str and "INDEX" not in detail_str:
|
||||
item.setForeground(1, QBrush(QColor("#f38ba8")))
|
||||
item.setForeground(1, QBrush(QColor("#e78284")))
|
||||
elif "INDEX" in detail_str or "SEARCH" in detail_str:
|
||||
item.setForeground(1, QBrush(QColor("#a6e3a1")))
|
||||
item.setForeground(1, QBrush(QColor("#a6d189")))
|
||||
|
||||
items[rid] = item
|
||||
parent_item = items.get(parent)
|
||||
@@ -334,8 +334,8 @@ class ExplainPanel(QWidget):
|
||||
legend_row = QHBoxLayout()
|
||||
legend_row.setContentsMargins(8, 2, 0, 4)
|
||||
for colour, label in [
|
||||
("#a6e3a1", "Efficient"), ("#f9e2af", "Moderate"),
|
||||
("#f38ba8", "Expensive / SCAN"),
|
||||
("#a6d189", "Efficient"), ("#e5c890", "Moderate"),
|
||||
("#e78284", "Expensive / SCAN"),
|
||||
]:
|
||||
dot = QLabel("●")
|
||||
dot.setStyleSheet(f"color: {colour};")
|
||||
@@ -414,7 +414,7 @@ class ExplainPanel(QWidget):
|
||||
self._status_lbl.setText(f"Error: {msg[:80]}")
|
||||
self._tree.clear()
|
||||
err_item = QTreeWidgetItem([f"⚠ {msg}"])
|
||||
err_item.setForeground(0, QBrush(QColor("#f38ba8")))
|
||||
err_item.setForeground(0, QBrush(QColor("#e78284")))
|
||||
self._tree.setColumnCount(1)
|
||||
self._tree.setHeaderLabels(["Error"])
|
||||
self._tree.addTopLevelItem(err_item)
|
||||
|
||||
Reference in New Issue
Block a user