This commit is contained in:
Benoit de Chezelles 2025-07-06 09:59:58 +02:00 committed by GitHub
commit c5488976a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 3 deletions

View file

@ -109,7 +109,7 @@ Use comma(,) separated list of all, age, size
`--color-scale-mode`, `--colour-scale-mode`
: Use gradient or fixed colors in `--color-scale`.
Valid options are `fixed` or `gradient`.
Valid options are `fixed` to use a fixed color (disabling color scale), or `gradient` to use an automatic darker (old/small file) to lighter (recent/big file) gradient of colors.
The default value is `gradient`.
`--icons=WHEN`

View file

@ -34,7 +34,9 @@ impl Default for ColorScaleOptions {
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub enum ColorScaleMode {
// Color scale is disabled, use a static color for the range
Fixed,
// Color scale uses an automatic gradient of colors for the range
Gradient,
}

View file

@ -89,7 +89,7 @@ impl f::Size {
vec![
csi.adjust_style(colours.size(Some(prefix)), size as f32, csi.size)
.paint(number),
csi.adjust_style(colours.size(Some(prefix)), size as f32, csi.size)
csi.adjust_style(colours.unit(Some(prefix)), size as f32, csi.size)
.paint(symbol),
]
} else {

View file

@ -147,7 +147,7 @@ impl Default for UiStyles {
impl Size {
pub fn colourful(scale: ColorScaleOptions) -> Self {
if scale.size && scale.mode == ColorScaleMode::Fixed {
if scale.mode == ColorScaleMode::Fixed {
Self::colourful_fixed()
} else {
Self::colourful_gradient()