From 26ffdaffe2b36ee955c721afac1a19011577d234 Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Wed, 15 May 2024 13:23:13 +0200 Subject: [PATCH] tasks: Use unique id for run indicator (#11846) This fixes a small visual issue with the run indicator. As all run indicators use the same element id they all show up as pressed when clicking on a single button. We can safely use a combination of "run_indicator" and the actual row as the element id, as there can only ever be one run indicator per line. Before: Screenshot 2024-05-15 at 12 24 08 After: image Release Notes: - Fixed an issue where all run buttons would show up as pressed when clicking on a single run button --- crates/editor/src/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 12aeb7baa0..5efc578eff 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -4560,7 +4560,7 @@ impl Editor { row: DisplayRow, cx: &mut ViewContext, ) -> IconButton { - IconButton::new("run_indicator", ui::IconName::Play) + IconButton::new(("run_indicator", row.0 as usize), ui::IconName::Play) .icon_size(IconSize::XSmall) .size(ui::ButtonSize::None) .icon_color(Color::Muted)