From d516b0f4920244ad0ca1714cdad1ab332a3452eb Mon Sep 17 00:00:00 2001 From: Dmitry Stepanov Date: Wed, 22 May 2024 22:45:38 +0300 Subject: [PATCH] made background curves dimmer --- fyrox-ui/src/curve/mod.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fyrox-ui/src/curve/mod.rs b/fyrox-ui/src/curve/mod.rs index c7813001e..6f60985c8 100644 --- a/fyrox-ui/src/curve/mod.rs +++ b/fyrox-ui/src/curve/mod.rs @@ -29,7 +29,7 @@ use crate::{ text::TextBuilder, widget::{Widget, WidgetBuilder, WidgetMessage}, BuildContext, Control, RcUiNodeHandle, Thickness, UiNode, UserInterface, VerticalAlignment, - BRUSH_BRIGHT, + BRUSH_BRIGHT, BRUSH_LIGHT, }; use fxhash::FxHashSet; use fyrox_graph::BaseSceneGraph; @@ -818,6 +818,10 @@ impl Control for CurveEditor { match msg { CurveEditorMessage::SyncBackground(curves) => { self.background_curves = CurvesContainer::from_native(curves); + + for curve in self.background_curves.iter_mut() { + curve.brush = BRUSH_LIGHT; + } } CurveEditorMessage::Sync(curves) => { let color_map = self @@ -1693,7 +1697,11 @@ impl CurveEditorBuilder { } pub fn build(mut self, ctx: &mut BuildContext) -> Handle { - let background_curves = CurvesContainer::from_native(&self.curves); + let mut background_curves = CurvesContainer::from_native(&self.curves); + for curve in background_curves.iter_mut() { + curve.brush = BRUSH_LIGHT; + } + let curves = CurvesContainer::from_native(&self.curves); let add_key;