iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
26.33k stars 1.28k forks source link

Use theme's base colors for preedit iff program style's background is not opaque #2819

Open kenz-gelsoft opened 1 month ago

kenz-gelsoft commented 1 month ago

Some iced apps may have non-opaque background color as iced_winit::Program::style().

For example, I'm trying to backport input method for COSMIC apps, those program styles have transparent background.

We're using that color for the background color of the preedit layer, but transparent background doesn't work well.

before
Screenshot_2025-02-27_00-40-25
after
Screenshot_2025-02-27_00-43-27

If that color is non-opaque color, should we use the theme's base color instead?

kenz-gelsoft commented 1 month ago

This PR doesn't change iced examples behaviors as far as I tested.