Skip to content

Add theme preference with Light/Dark/System selection#71

Open
Copilot wants to merge 3 commits intomainfrom
copilot/add-theme-selection-option
Open

Add theme preference with Light/Dark/System selection#71
Copilot wants to merge 3 commits intomainfrom
copilot/add-theme-selection-option

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 29, 2026

Adds user preference for light/dark mode theme selection under Settings → Preferences → Theme.

Changes

Config persistence

  • New theme field in config file with values: "light", "dark", "system" (default)
  • Validation on load/save with fallback to system for invalid values

Theme application

  • apply_theme() function sets Qt QPalette colors for light/dark modes
  • System option resets to platform defaults
  • Applied immediately on selection (no restart required)
  • Applied on startup from saved preference

Menu structure

  • New "Preferences" submenu under Settings menu
  • "Theme" submenu with mutually exclusive checkable options via QActionGroup

Screenshots

Dark Theme

Dark Theme

Light Theme

Light Theme

Tests

14 new tests in test_theme.py covering persistence, validation, backward compatibility, and color specifications. All 67 tests pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add option to change theme</issue_title>
<issue_description>## Goal

Add user preference for light/dark mode theme selection, with options to explicitly choose light, dark, or follow system default.

Success Criteria

  • New "Preferences" submenu exists under the Settings menu
  • Preferences submenu contains theme selection with three options: Light, Dark, System (default)
  • Selecting Light or Dark applies that theme immediately, regardless of system setting
  • Selecting System respects the OS light/dark mode preference (current behavior)
  • Theme preference persists across application restarts via existing config file
  • Application loads with correct theme on startup based on saved preference
  • All existing tests pass
  • New tests cover theme preference persistence and application

Constraints

  • Use existing config file mechanism for persistence—do not introduce new storage
  • Do not modify existing Settings menu items; add new Preferences submenu alongside them
  • Out of scope: custom themes, accent colors, scheduled theme switching

Context

  • Existing settings/config persistence: (wherever current settings are saved)
  • Settings menu implementation: (wherever the current menu is defined)

Notes

  • "System" should be the default for new installations to preserve current behavior
  • Consider whether theme change requires restart or can apply live (live preferred if feasible)</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 29, 2026 22:04
- Add "theme" field to config with "system" as default
- Add Preferences submenu under Settings menu with Theme option
- Implement Light, Dark, and System (Default) theme selections
- Apply theme immediately on selection using Qt palette
- Persist theme preference across restarts
- Add 12 new tests for theme functionality (65 total tests pass)

Co-authored-by: JustinUhr <56878072+JustinUhr@users.noreply.github.com>
- Add theme validation in LeidenToEpiDocConverter.__init__()
- Add theme validation in set_theme() method with logging
- Add theme validation in apply_theme() function with logging
- Use consistent display names matching menu labels in status messages
- Improve test_theme.py with more meaningful tests:
  - Better validation tests that check both valid and invalid inputs
  - Color specification tests that verify theme color values
  - Display name tests that verify UI labels

Co-authored-by: JustinUhr <56878072+JustinUhr@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to change theme with user preferences Add theme preference with Light/Dark/System selection Jan 29, 2026
Copilot AI requested a review from JustinUhr January 29, 2026 22:09
@JustinUhr JustinUhr marked this pull request as ready for review January 29, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to change theme

2 participants