Skip to content

Add themes - #908

Open
Pignated wants to merge 3 commits into
MalpenZibo:mainfrom
Pignated:add_themes
Open

Add themes#908
Pignated wants to merge 3 commits into
MalpenZibo:mainfrom
Pignated:add_themes

Conversation

@Pignated

@Pignated Pignated commented Aug 5, 2026

Copy link
Copy Markdown

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.

@MalpenZibo

MalpenZibo commented Aug 12, 2026

Copy link
Copy Markdown
Owner

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

@Pignated

Copy link
Copy Markdown
Author

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 MalpenZibo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/config.rs
pub theme: Option<String>,
}

// 2. Define a Shadow Struct that replicates your fields as raw Serde values

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ai tool comment

Comment thread src/config.rs

// 2. Define a Shadow Struct that replicates your fields as raw Serde values
#[derive(Deserialize)]
struct AppearanceShadow {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why AppearanceShadow?

Comment thread src/config.rs
Comment on lines -1052 to -1053
/// Blur the wallpaper behind ashell's translucent surfaces via
/// `ext-background-effect-v1`. No-op where the protocol is unsupported.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Comment thread src/config.rs
#[derive(Clone, Debug)]
pub struct Appearance {
pub font_name: Option<String>,
#[serde(deserialize_with = "scale_factor_deserializer")]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Comment thread src/utils/themes.rs
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 }
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to avoid this conversion?

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.

2 participants