The HyprRice theme system has been completely redesigned to provide a unified, modern experience with proper system integration. The new system eliminates the previous issues with mixed light/dark elements and provides seamless theme switching.
- Three Themes:
dark,light, andauto - System Integration: Automatically detects and matches system theme preferences
- Consistent Styling: No more mixed light/dark elements
- Modern Design: Clean, professional appearance
- Background: Deep black (
#0f0f0f) for modern look - Text: High contrast white (
#ffffff) for accessibility - Accent: System accent color integration
- Borders: Subtle but defined (
#404040) - Shadows: Deep, modern shadows
- Background: Light grey (
#f5f5f5) instead of bright white - Text: Dark on light (
#1a1a1a) for readability - Accent: System accent color integration
- Borders: Light grey (
#d4d4d4) for subtle definition - Shadows: Light, soft shadows
- GNOME: Detects
color-schemeviagsettings - KDE/Plasma: Reads
kdeglobalsconfiguration - GTK: Checks
GTK_THEMEenvironment variable - XFCE: Reads XFCE configuration files
- Fallback: Defaults to dark theme for modern look
- KDE/Plasma: Reads
AccentColorfromkdeglobals - GTK: Checks
accent_colorin GTK settings - GNOME: Uses
gsettingsfor accent color - XFCE: Reads accent color from XFCE config
- Environment: Supports
HYPRRICE_ACCENT_COLORoverride - Fallback: Modern indigo (
#6366f1) as default
- Location:
src/hyprrice/gui/modern_theme.py - Purpose: Main theme management system
- Features:
- System accent color detection
- Theme switching
- QSS stylesheet generation
- Color utilities (lighten/darken)
def _detect_system_accent_color(self) -> str
def _detect_system_theme(self) -> str
def _get_modern_dark_theme(self) -> Dict[str, str]
def _get_greyish_light_theme(self) -> Dict[str, str]
def set_theme(self, theme: str)
def get_qss(self) -> str_lighten_color(color, factor): Lightens hex colors_darken_color(color, factor): Darkens hex colors- Automatic accent variations: Hover, pressed, light variants
- Comprehensive styling: All UI components styled
- Modern design: Rounded corners, proper spacing
- Accessibility: High contrast, proper focus indicators
- Responsive: Adapts to different screen sizes
# Set specific theme
theme.set_theme("dark")
theme.set_theme("light")
# Auto-detect system theme
theme.set_theme("auto")
# Apply to application
theme.apply_to_application(QApplication.instance())- View → Theme → Dark: Switch to dark theme
- View → Theme → Light: Switch to light theme
- View → Theme → Auto: Auto-detect system theme
gui:
theme: "auto" # auto, dark, or light- GNOME: Full support via
gsettings - KDE/Plasma: Full support via
kdeglobals - XFCE: Full support via XFCE config
- GTK: Basic support via environment variables
- Generic: Fallback detection methods
HYPRRICE_THEME: Override theme (dark/light)HYPRRICE_ACCENT_COLOR: Override accent color
- No more mixed themes: Unified styling across all components
- System integration: Matches user's desktop environment
- Accessibility: High contrast, proper focus indicators
- Modern appearance: Clean, professional design
- Automatic detection: No manual configuration needed
- Seamless switching: Instant theme changes
- System consistency: Matches desktop environment
- Future-proof: Extensible for new themes
- Clean API: Simple theme switching
- Extensible: Easy to add new themes
- Maintainable: Well-organized code structure
- Testable: Comprehensive test coverage
- System detection: Accent color and theme detection
- Theme switching: All three themes
- Color utilities: Lighten/darken functions
- QSS generation: Stylesheet compilation
- GUI integration: Complete application testing
🎨 Testing New Unified Theme System
==================================================
🔍 System Detection:
System Accent Color: #b875dc
Detected Theme: dark
Available Themes: ['auto', 'dark', 'light']
🌙 Dark Theme Colors:
Background: #0f0f0f
Text: #ffffff
Accent: #b875dc
Border: #404040
☀️ Light Theme Colors:
Background: #f5f5f5
Text: #1a1a1a
Accent: #b875dc
Border: #d4d4d4
✅ Theme System Test Complete!
- Remove hardcoded themes: Old theme files are no longer needed
- Update configuration: Set
gui.theme: "auto"for best experience - Test system detection: Verify accent color and theme detection
- Customize if needed: Use environment variables for overrides
# Old
gui:
theme: "dark"
accent_color: "#6366f1"
# New
gui:
theme: "auto" # Auto-detect system theme
# accent_color is now detected automatically- Custom themes: User-defined theme creation
- Theme presets: Pre-built theme collections
- Animation support: Smooth theme transitions
- Accessibility modes: High contrast, large text options
- Theme sharing: Export/import custom themes
- Plugin support: Themes can be provided by plugins
- API integration: External theme sources
- Dynamic loading: Runtime theme switching
- Configuration sync: Sync with system settings
The new HyprRice theme system provides a modern, unified experience that seamlessly integrates with the user's desktop environment. It eliminates the previous issues with mixed themes and provides a professional, accessible interface that adapts to user preferences automatically.
The system is designed to be extensible, maintainable, and user-friendly, providing a solid foundation for future enhancements while solving the immediate issues with theme consistency and system integration.