$ show tsujan/Kvantum
Kvantum is a Qt-based SVG theme engine for Linux desktop environments, implemented as a QStyle plugin that renders widgets using vector graphics from theme configuration files. The system includes a style plugin (Kvantum style), a GUI manager (Kvantum Manager) for installing, selecting, and configuring themes, and a preview application (Kvantum Preview) to showcase widget rendering. The style engine supports complex theming with configurable frame, interior, indicator, label, and size specs, as well as animations, blur effects, window dragging, per-application hacks, and desktop environment integration (KDE, LXQt, GNOME, etc.). The architecture is a monolith in the sense that the style plugin and two companion apps share common code paths (e.g., ThemeConfig, BlurHelper, WindowManager), but the codebase is split across Qt4, Qt5, and Qt6 variants with significant duplication. The primary data flow is: user selects a theme → Kvantum Manager writes config files → Kvantum style reads .kvconfig and .svg assets at runtime → Qt applications render widgets according to the theme specifications. External dependencies are Qt (≥6.6), QSvgRenderer, and optionally KDE's KWindowEffects for blur.
The LLM identified 4 files worth highlighting for reuse:
A generic configuration loader for Qt style plugins that reads .kvconfig files with inheritance support. It defines specs (frame, interior, indicator, label, size, color, hacks) and caches them in QMap. The `getValue()` method traverses inherited groups and parent config files, making it reusable for any project needing hierarchical key-value configuration with inheritance.
Implements window dragging by clicking on widgets (menu bars, toolbars, empty areas) using QWindow::startSystemMove() and synthetic mouse events. Features a delayed-drag state machine, per-app blacklist (ExceptionId set), and platform-conditional logic (X11/Wayland). The event-filter pattern and blacklist management are reusable for any Qt application needing custom window interaction.
Manages blur behind translucent windows, abstracting KDE's KWindowEffects via X11 atoms or KDE API. Provides register/unregister widget methods and handles compositing detection. The blur region management and platform abstraction are reusable for any Qt application that needs to interface with KDE's compositing effects.
A lightweight animation framework for widget state changes (hover, focus, press). Includes classes like ProgressbarAnimation, NumberAnimation, and ScrollbarAnimation with configurable frame rate and opacity interpolation. The timer-based approach and state machine are reusable for any Qt application needing simple value animations without QML.