Files
oak-gpui/crates/gpui/src
Jason Lee a092ff0c4f gpui: Add opacity to support transparency of the entire element (#17132)
Release Notes:

- N/A

---

Add this for let GPUI element to support fade in-out animation.

## Platform test

- [x] macOS
- [x] blade `cargo run -p gpui --example opacity --features macos-blade`

## Usage

```rs
div()
    .opacity(0.5)
    .bg(gpui::black())
    .text_color(gpui::black())
    .child("Hello world")
```

This will apply the `opacity` it self and all children to use `opacity`
value to render colors.

## Example

```
cargo run -p gpui --example opacity
cargo run -p gpui --example opacity --features macos-blade
```

<img width="612" alt="image"
src="https://github.com/user-attachments/assets/f1da87ed-31f5-4b55-a023-39e8ee1ba349">
2024-09-04 12:53:45 +02:00
..
2024-07-22 10:46:16 -06:00
2024-06-18 12:16:54 -07:00
2024-03-11 10:45:57 +01:00
2024-08-06 16:55:51 -04:00
2024-07-22 10:46:16 -06:00
2024-07-22 10:46:16 -06:00
2024-01-21 14:26:45 -08:00
2024-05-29 18:06:45 -07:00