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>
This commit is contained in:
@@ -10,8 +10,15 @@ from app.config.settings import get_settings
|
||||
_FONT_FAMILIES = ["Consolas", "JetBrains Mono", "Fira Code", "Cascadia Code", "Courier New"]
|
||||
_PAGE_SIZES = [50, 100, 500, 1000, 0] # 0 → All
|
||||
_PAGE_LABELS = ["50", "100", "500", "1 000", "All"]
|
||||
_THEMES = [("dark", "🌙 Dark (Catppuccin Frappé)"),
|
||||
("light", "☀️ Light (Catppuccin Latte)")]
|
||||
_THEMES = [
|
||||
("dark", "🌙 Catppuccin Frappé (dark blue-gray)"),
|
||||
("one_dark", "⬛ One Dark Pro (VS Code classic)"),
|
||||
("nord", "❄️ Nord (arctic blue-gray)"),
|
||||
("tokyo_night", "🌃 Tokyo Night (deep purple-dark)"),
|
||||
("dracula", "🧛 Dracula (classic purple-dark)"),
|
||||
("light", "☀️ Catppuccin Latte (warm light)"),
|
||||
("github_light", "📄 GitHub Light (clean minimal)"),
|
||||
]
|
||||
|
||||
|
||||
class PreferencesDialog(QDialog):
|
||||
@@ -20,8 +27,8 @@ class PreferencesDialog(QDialog):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setWindowTitle("Preferences")
|
||||
self.setMinimumWidth(400)
|
||||
self.resize(420, 380)
|
||||
self.setMinimumWidth(440)
|
||||
self.resize(460, 400)
|
||||
self._build_ui()
|
||||
self._load()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user