From b7e7946e9e8cd1e243f2cd2ebf0634e22353128b Mon Sep 17 00:00:00 2001 From: MartinFillon Date: Fri, 1 Dec 2023 23:38:18 +0100 Subject: [PATCH] fix(color-scale): fixing color of size unit see #684 --- src/theme/default_theme.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/theme/default_theme.rs b/src/theme/default_theme.rs index 13f5b27fb..4afdbe5fa 100644 --- a/src/theme/default_theme.rs +++ b/src/theme/default_theme.rs @@ -1,7 +1,8 @@ use ansiterm::Colour::*; use ansiterm::Style; +use std::default::Default; -use crate::output::color_scale::ColorScaleOptions; +use crate::output::color_scale::{ColorScaleMode, ColorScaleOptions}; use crate::theme::ui_styles::*; impl UiStyles { @@ -124,10 +125,10 @@ impl UiStyles { impl Size { pub fn colourful(scale: ColorScaleOptions) -> Self { - if scale.size { - Self::colourful_gradient() - } else { + if scale.size && scale.mode == ColorScaleMode::Fixed { Self::colourful_fixed() + } else { + Self::colourful_gradient() } }