diff --git a/PartPreviewWindow/RunningTaskRow.cs b/PartPreviewWindow/RunningTaskRow.cs index b8aec4ac8..f1d378747 100644 --- a/PartPreviewWindow/RunningTaskRow.cs +++ b/PartPreviewWindow/RunningTaskRow.cs @@ -38,16 +38,17 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { public class RunningTaskRow : FlowLayoutWidget { - private ProgressBar progressBar; - - private ExpandCheckboxButton expandButton; - internal RunningTaskDetails taskDetails; + private ProgressBar progressBar; + private ExpandCheckboxButton expandButton; + private ThemeConfig theme; + public RunningTaskRow(string title, RunningTaskDetails taskDetails, ThemeConfig theme) : base(FlowDirection.TopToBottom) { this.taskDetails = taskDetails; + this.theme = theme; this.MinimumSize = new Vector2(100, 20); @@ -172,6 +173,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow taskDetails.ProgressChanged += TaskDetails_ProgressChanged; } + public Color ProgressBackgroundColor + { + get => progressBar.BackgroundColor = this.BorderColor; + set => progressBar.BackgroundColor = value; + } + private void SetExpansionMode(ThemeConfig theme, GuiWidget detailsPanel, bool isExpanded) { expandButton.Checked = isExpanded; diff --git a/PartPreviewWindow/RunningTasksWidget.cs b/PartPreviewWindow/RunningTasksWidget.cs index c468216ac..2ecf454c7 100644 --- a/PartPreviewWindow/RunningTasksWidget.cs +++ b/PartPreviewWindow/RunningTasksWidget.cs @@ -90,6 +90,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } } + var progressBackgroundColor = borderColor.AdjustAlpha(35); + // Add new items foreach (var taskItem in tasks.RunningTasks.Where(t => !displayedTasks.Contains(t))) { @@ -99,6 +101,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow BackgroundColor = theme.AccentMimimalOverlay, Border = new BorderDouble(1, 1, 1, 0), BorderColor = borderColor, + ProgressBackgroundColor = progressBackgroundColor }; pendingTasksList.AddChild(taskRow);