Closed SamRodri closed 2 months ago
Window! { widget::background_color = colors::BLUE; when #gesture::is_hovered { widget::background_color = colors::RED; } child_align = Align::CENTER; child = Container! { layout::size = 50; widget::background_color = colors::BLUE; when #gesture::is_hovered { widget::background_color = colors::RED; } } }
1 - Run. 2 - Observe window opening not under mouse cursor.
On init, the Window! background is RED (wrong), the Container! background is BLUE (correct).
Window!
Container!
Window background also BLUE.
cargo 1.81.0 (2dbb1af80 2024-08-20) release: 1.81.0 commit-hash: 2dbb1af80a2914475ba76827a312e29cedfa6b2f commit-date: 2024-08-20 host: x86_64-unknown-linux-gnu libgit2: 1.8.1 (sys:0.19.0 vendored) libcurl: 8.8.0-DEV (sys:0.4.73+curl-8.8.0 vendored ssl:OpenSSL/1.1.1w) ssl: OpenSSL 1.1.1w 11 Sep 2023 os: Ubuntu 24.4.0 (noble) [64-bit]
I tried this code:
Following these steps:
1 - Run. 2 - Observe window opening not under mouse cursor.
I saw this happen:
On init, the
Window!
background is RED (wrong), theContainer!
background is BLUE (correct).I expected this to happen:
Window background also BLUE.
Cargo version: