mirror of
https://github.com/eza-community/eza.git
synced 2025-08-04 17:08:42 +00:00
Merge 4c1a617e12
into fa2f3216ad
This commit is contained in:
commit
c5488976a5
4 changed files with 5 additions and 3 deletions
|
@ -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`
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue