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

transparent application background #124

Open
Gibbz opened this issue Feb 4, 2025 · 4 comments
Open

transparent application background #124

Gibbz opened this issue Feb 4, 2025 · 4 comments

Comments

@Gibbz
Copy link

Gibbz commented Feb 4, 2025

Id love to be able to set a transparent or semi-transparent background on the app. It would be very handy feature for overlays and popup's.

@Decodetalkers
Copy link
Collaborator

https://github.com/waycrate/exwlshelleventloop/blob/master/iced_examples/counter/src/main.rs#L159-L165

emm but this one is for all the windows. but I think you can use the style of iced to set them transparent

@Gibbz
Copy link
Author

Gibbz commented Feb 5, 2025

This didn't work when I tried. I'll have another go and see.

@Gibbz
Copy link
Author

Gibbz commented Feb 6, 2025

so ive tried 2 different methods. neither work. when i use transparent i just get a black background. If i use the rgba i get a colored background. Neither are transparent.

    fn style(&self, theme: &Self::Theme) -> iced_layershell::Appearance {
        iced_layershell::Appearance {
            background_color: Color::TRANSPARENT,
            //background_color: Color::from_rgba(0.21, 0.23, 0.25, 0.5),
            text_color: theme.palette().text,
        }
    }

edit: tried running the counter demo, and the panel demo. neither are transparent. But its shown as transparent in the image....
https://github.com/waycrate/exwlshelleventloop/tree/master/iced_examples/bottom_panel

is this possibly a driver issue?

@Decodetalkers
Copy link
Collaborator

so ive tried 2 different methods. neither work. when i use transparent i just get a black background. If i use the rgba i get a colored background. Neither are transparent.

fn style(&self, theme: &Self::Theme) -> iced_layershell::Appearance {
    iced_layershell::Appearance {
        background_color: Color::TRANSPARENT,
        //background_color: Color::from_rgba(0.21, 0.23, 0.25, 0.5),
        text_color: theme.palette().text,
    }
}

edit: tried running the counter demo, and the panel demo. neither are transparent. But its shown as transparent in the image.... https://github.com/waycrate/exwlshelleventloop/tree/master/iced_examples/bottom_panel

is this possibly a driver issue?

I do not know.. it works on my sway.. what is your wm?

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

No branches or pull requests

2 participants