Skip to content

Implement Light and Dark Theme System #11

@leo7418

Description

@leo7418

The application should support both light and dark themes with a seamless switching mechanism and proper theme management system.

Current State

The application currently has:

  • Theme system implemented: Complete light and dark theme files (assets/themes/light.txt and assets/themes/dark.txt) with comprehensive styling for all UI components
  • Theme loading disabled: Theme loading is commented out (// tgui::Theme::setDefault("assets/themes/Black.txt"); in Application.cpp:26)
  • No theme selection mechanism: No way for users to choose between themes
  • Hardcoded colors: Manual color adjustments scattered throughout the codebase instead of relying on theme files

Requirements

Core Theme System

  • Theme Activation: Enable theme loading and set a default theme on application startup
  • Theme Persistence: Theme selection should be saved to application settings and restored on startup
  • Dynamic Theme Switching: Users should be able to change themes without restarting the application
  • Theme Detection: Support system theme detection (when available on the platform)

Theme Configuration

  • Remove Hardcoded Colors: Eliminate all manual color adjustments in the codebase and rely entirely on theme files
  • Theme Consistency: Ensure all UI components use colors defined in theme files
  • Icon Support: Implement automatic icon switching based on theme (already has black/white variants in assets/images/)

User Interface

  • Theme Selector: Add theme selection in the Settings page under "Application Settings"
    • Options: "System", "Light", "Dark"
    • Default to "System" when available, fallback to "Dark"
  • Real-time Preview: Theme changes should apply immediately without restart
  • Visual Feedback: Show current theme state in the settings UI

The implementation should follow the existing MVC architecture and leverage the comprehensive theme files already created, focusing on removing hardcoded colors and implementing the theme selection mechanism.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions