The Wayback Machine - https://web.archive.org/web/20220209035358/https://github.com/iced-rs/iced/issues/1022
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System themes #1022

Open
mmstick opened this issue Sep 3, 2021 · 7 comments
Open

System themes #1022

mmstick opened this issue Sep 3, 2021 · 7 comments

Comments

@mmstick
Copy link

@mmstick mmstick commented Sep 3, 2021

What's the stance on supporting system themes? It's often important to have a consistent UX across the desktop, with all applications sharing a common system theme by default. Will iced support allowing users and distributors to design system themes that can be applied universally to all iced applications?

@yusdacra
Copy link
Contributor

@yusdacra yusdacra commented Sep 3, 2021

I'm not sure how feasible it would be, but perhaps writing iced backends for native toolkits of a platform (qt, gtk, etc.) would work? I know druid supports native platform toolkits so it should be possible.

@mmstick
Copy link
Author

@mmstick mmstick commented Sep 3, 2021

Let's say that I have an OS, and I want to build that OS around a toolkit that isn't GTK or Qt. I'm already using GTK for building applications in this OS, but I want to see if there are better solutions that I could use should I want to transition away from GTK. So what I want isn't to use a toolkit that has a reliance on GTK or Qt, but a toolkit that I can use as an alternative to them. But that would require that such theoretical toolkit supports defining system themes.

@yusdacra
Copy link
Contributor

@yusdacra yusdacra commented Sep 3, 2021

Ah so you mean as in, say, something like a "theming backend", which could perhaps support using GTK themes, or Qt themes etc.?

@mmstick
Copy link
Author

@mmstick mmstick commented Sep 3, 2021

Having something like /etc/iced/settings.{ron|toml} that supports defining a theme by name, and having themes placed in /usr/share/themes/{NameOfTheme}/iced/, using whatever format works best for iced. This way, if I develop an application for this OS, it would use the system theme by default, but users could change the system theme to one they created. Applications could extend the theme or opt into their own custom theme at the application level.

@mmstick
Copy link
Author

@mmstick mmstick commented Sep 3, 2021

I guess to be clear, support for GTK and Qt themes is not something I'd expect. Instead, a theme format specific to Iced. I don't generally think it wise to try to guess color schemes and layouts from a GTK theme.

@hecrj
Copy link
Member

@hecrj hecrj commented Sep 4, 2021

I think it sounds like a good idea! I am not happy with our current default theme. This would be part of the efforts to improve it.

We could make iced search for user settings to obtain the default theme, instead of using the currently hardcoded one. For this, we would need to change the widgets slightly and pass the default theme around when rendering, since it will be chosen at runtime during initialization now.

@hecrj hecrj added the feature label Sep 4, 2021
@13r0ck
Copy link
Member

@13r0ck 13r0ck commented Sep 5, 2021

Where are the hard coded values? I am willing to try and make a draft for this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment