Skip to content

Commit 8e58517

Browse files
oracle58ickshonpe
andauthored
box_shadow example with adjustable settings (#19345)
# Objective - Addresses the previous example's lack of visual appeal and clarity. It was missing labels for clear distinction of the shadow settings used on each of the shapes. The suggestion in the linked issue was to either just visually update and add labels or to collapse example to a single node with adjustable settings. - Fixes #19240 ## Solution - Replace the previous static example with a single, central node with adjustable settings as per issue suggestion. - Implement button-based setting adjustments. Unfortunately slider widgets don't seem available yet and I didn't want to further bloat the example. - Improve overall aesthetics of the example -- although color pallette could still be improved. flat gray tones are probably not the best choice as a contrast to the shadow, but the white border does help in that aspect. - Dynamically recolor shadows for visual clarity when increasing shadow count. - Add Adjustable Settings: - Shape selection - Shadow X/Y offset, blur, spread, and count - Add Reset button to restore default settings The disadvantage of this solution is that the old example code would have probably been easier to digest as the new example is quite bloated in comparison. Alternatively I could also just implement labels and fix aesthetics of the old example without adding functionality for adjustable settings, _but_ I personally feel like interactive examples are more engaging to users. ## Testing - Did you test these changes? If so, how? `cargo run --example box_shadow` and functionality of all features of the example. - Are there any parts that need more testing? Not that I am aware of. - How can other people (reviewers) test your changes? Is there anything specific they need to know? Not really, it should be pretty straightforward just running the new example and testing the feats. --- ## Showcase ![box-shadow-example-1](https://github.com/user-attachments/assets/57586b30-c290-4e3f-9355-5c3f6e9a6406) ![box-shadow-example-2](https://github.com/user-attachments/assets/51a51d2f-dd30-465b-b802-ddb8077adff5) --------- Co-authored-by: ickshonpe <[email protected]>
1 parent 571b3ba commit 8e58517

File tree

1 file changed

+601
-231
lines changed

1 file changed

+601
-231
lines changed

0 commit comments

Comments
 (0)