linebender / linebender/druid

Some way to access the child of a SizedBox and a Container

Open
#1,141 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.