pegasus-frontend
pegasus-frontend copied to clipboard
[Feature Request] Provide a way for themes to define settings.
As themes become more feature rich, it's nice to be able to provide options and settings to users for different ways to configure a theme.
Themes can of course create their own screen to manage settings & preferences. But the downside here is it ends up being an inconsistent experience for users, adds an extra burden for themes, and means there's multiple places within the app to change settings (pegasus settings screen as well as the theme settings page).
So propose it could be nice for themes to be able to expose a set of configuration items be configured via the main Pegasus settings page. The user could then change the theme preferences in the Pegasus settings page, and those values would be available to the theme via an API.
A very rough example just to illustrate the point could be:
Define in theme.cfg
settings:
themeColor:
title: Theme Color
type: list
labels: Light, Dark
keys: light, dark
Access in qml
themeColor = api.settings.get('themeColor')
Yes, there were plans to add a unified interface for that, eg. as part of #348, but then theme makers got to it faster than me :) I'd still like to implement this eventually though!