Some way to access the child of a SizedBox and a Container
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
I created a widget with the code `Label::new("foo").with_text_color(Color::BLACK).border(Color::BLACK, 0.5)` and needed to store it somewhere. The return type of this builder was `Container`, so I made a field of that type, stored it, and moved on. Later I wanted to be able to dynamically change the text color of the label, but I couldn't find a way to access this property through the Container. It would be helpful to have a `.child()` getter or similar to enable this sort of usecase. Maybe even a `Deref` impl, although that might be too much.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the SizedBox and Container widget implementations and tracing how their child widgets are stored and exposed. Review existing widget access patterns before deciding how the stored Label should be reached, then verify that a caller can dynamically update the child’s text color without breaking the container API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100