3 Commits
Author SHA1 Message Date
nngoandClaude Sonnet 4.6 5a536fb9e9 feat: add 5 new themes via single QSS template engine
Replaces the two hard-coded .qss files with a single
resources/style_template.qss that uses @{token} placeholders.
apply_qss() now does regex substitution at runtime, so adding a
theme only requires a palette dict — no duplicate stylesheets.

New themes (Preferences → Color theme):
  • One Dark Pro   — VS Code classic dark
  • Nord           — arctic blue-gray dark
  • Tokyo Night    — deep purple-dark
  • Dracula        — classic purple-dark
  • GitHub Light   — clean minimal light

Existing Catppuccin Frappé (dark) and Latte (light) are unchanged.
Ctrl+Shift+T quick-toggle now recognises all dark themes via is_dark().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 09:54:02 -04:00
nngoandClaude Sonnet 4.6 06b951daf7 feat: dark/light theme toggle (Catppuccin Frappé ↔ Latte)
- app/config/theme.py: palette definitions for both themes + apply_qss()
  helper used by both main.py (startup) and MainWindow (live toggle)
- resources/style_light.qss: complete Catppuccin Latte QSS
- View menu: ☀️/🌙 Switch Theme action (Ctrl+Shift+T) toggles live
- Preferences → Appearance: Color theme dropdown persists choice
- SQLHighlighter: _build_rules() reads get_palette(); update_theme()
  rebuilds rules and rehighlights all open editors on switch
- SqlCompleter: popup stylesheet reads get_palette() via
  _apply_popup_style(); update_theme() called on switch
- EditableTableModel: dirty/delete cell colors read get_palette() live
- ResultTableModel: NULL_COLOR property reads get_palette() live
- TableViewer: apply_settings() refreshes frozen-view border + repaints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 09:11:05 -04:00
nngoandClaude Sonnet 4.6 771c92b7b6 feat: preferences dialog, SQL formatter, and enhanced table context menu
- PreferencesDialog (Tools → Preferences, Ctrl+,): font family/size,
  word wrap, default page size, query timeout, max history, auto-commit;
  font changes apply live to all open editors via apply_settings() cascade
- CodeEditor and TableViewer now read initial values from settings singleton
- SQL formatter (≡ Format button): uses sqlparse to reindent and uppercase
  keywords; gracefully prompts to install sqlparse if missing
- Table viewer context menu: "Filter by this value" (populates WHERE and
  reloads), "Copy row as SQL INSERT" (ready-to-paste INSERT statements),
  renamed "Copy row" → "Copy row as TSV" for clarity

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 17:05:54 -04:00