Scrollbar animation causing full-frame refresh
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
Further to [this Zulip topic](https://xi.zulipchat.com/#narrow/stream/255910-druid-help/topic/Scroll.20in.20Either.20unexpected.20behaviour), I have an example where the scrollbar fade animation of a `Scroll` inside of an `Either` is causing another widget to paint. The problem is fixed by removing the Either wrapper. I'm using the master branch and running on Ubuntu 20.04.
```rust
use druid::widget::{Either, Flex, Painter, Scroll};
use druid::{AppLauncher, Data, WidgetExt, WindowDesc};
#[derive(Clone, Data)]
struct AppData;
fn main() {
let widget = Flex::row()
.with_child(Either::new(
|_, _| true,
Scroll::new(Flex::column().fix_size(300., 9999.)),
Flex::column(),
))
.with_child(Painter::new(|_, _, _| println!("paints")));
let window = WindowDesc::new(widget);
AppLauncher::with_window(window).launch(AppData {}).unwrap();
}
```
Cargo.toml
```toml
[package]
name = "rust_playground"
version = "0.1.0"
edition = "2021"
[dependencies]
druid = { git = "https://github.com/linebender/druid" }
```
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 running the provided Rust reproduction on Ubuntu 20.04, focusing on the Scroll inside Either and the neighboring Painter. Trace the scrollbar fade animation and painting behavior; done means the sibling Painter is not repainted during the scrollbar animation while the Scroll remains inside Either.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100