Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a visual issue where shadow effects were invisible against dark backgrounds by making them transparent instead of partially-transparent black.
- Replaces semi-transparent black shadow colors with
Color::TRANSPARENT - Resets shadow offsets from custom values to
Vector::ZERO - Sets blur radius to
0.0to completely disable shadow effects
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| harbor-ui/src/components/toast.rs | Updates shadow styling in the styled function to use transparent color |
| harbor-ui/src/components/confirm_modal.rs | Updates shadow styling in both confirm_modal and basic_modal functions to use transparent color |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| shadow: Shadow { | ||
| color: Color::from_rgba8(0, 0, 0, 0.25), | ||
| offset: Vector::new(-2., -2.), | ||
| blur_radius: 4., | ||
| color: Color::TRANSPARENT, | ||
| offset: Vector::ZERO, | ||
| blur_radius: 0.0, | ||
| }, |
There was a problem hiding this comment.
[nitpick] Instead of setting all shadow properties to zero/transparent, consider removing the shadow property entirely or using a default/disabled shadow configuration to make the intent clearer.
| shadow: Shadow { | ||
| color: Color::from_rgba8(0, 0, 0, 0.5), | ||
| offset: Vector::new(4.0, 4.0), | ||
| blur_radius: 8.0, | ||
| color: Color::TRANSPARENT, | ||
| offset: Vector::ZERO, | ||
| blur_radius: 0.0, | ||
| }, |
There was a problem hiding this comment.
[nitpick] Instead of setting all shadow properties to zero/transparent, consider removing the shadow property entirely or using a default/disabled shadow configuration to make the intent clearer.
| shadow: Shadow { | ||
| color: Color::from_rgba8(0, 0, 0, 0.5), | ||
| offset: Vector::new(4.0, 4.0), | ||
| blur_radius: 8.0, | ||
| color: Color::TRANSPARENT, | ||
| offset: Vector::ZERO, | ||
| blur_radius: 0.0, | ||
| }, |
There was a problem hiding this comment.
[nitpick] Instead of setting all shadow properties to zero/transparent, consider removing the shadow property entirely or using a default/disabled shadow configuration to make the intent clearer.
Currently, the usage of iced shadows are all partially-transparent black, but the background is set to be dark, so the shadow is practically invisible. Let's just set it to be transparent.