Add themes - #908
Conversation
|
I understand the necessity to have a faster way to setup the palette but this PR as it is has too many issues. We can create a documentation settings section with pre-configured palette to copy and paste in the config file. Otherwise we can follow this route but the PR need to be reworked |
|
If you have any guidelines one what needs to be changed/fixed I'd be happy to make changes! I think that having this easy "drop in" type of template application might be very beneficial to users who prefer a simple setup but I will be the first to admit I have a lot to learn and what I did is far from efficient/perfect. |
MalpenZibo
left a comment
There was a problem hiding this comment.
I left some comments. Also, check the CI; we have errors.
In general, for this feature, I prefer to leave some config examples in the documentation instead of adding a theme config in the code
| pub theme: Option<String>, | ||
| } | ||
|
|
||
| // 2. Define a Shadow Struct that replicates your fields as raw Serde values |
|
|
||
| // 2. Define a Shadow Struct that replicates your fields as raw Serde values | ||
| #[derive(Deserialize)] | ||
| struct AppearanceShadow { |
| /// Blur the wallpaper behind ashell's translucent surfaces via | ||
| /// `ext-background-effect-v1`. No-op where the protocol is unsupported. |
| #[derive(Clone, Debug)] | ||
| pub struct Appearance { | ||
| pub font_name: Option<String>, | ||
| #[serde(deserialize_with = "scale_factor_deserializer")] |
| let b = (color.b.clamp(0.0, 1.0) * 255.0).round() as u8; | ||
| let a = (color.a.clamp(0.0, 1.0) * 255.0).round() as u8; | ||
| HexColor { r, g, b, a } | ||
| } |
There was a problem hiding this comment.
Is there a way to avoid this conversion?
Added some themes that can be used by those who want a different look but don't want to both with actual configuration. Currently it's just the ones built into iced, but more easily could be added.