diff --git a/resources/style.css b/resources/style.css index 690a05d..5615b59 100644 --- a/resources/style.css +++ b/resources/style.css @@ -1,8 +1,18 @@ toolbarview#main { /* from amberol */ - background: linear-gradient(127deg, color-mix(in srgb, var(--background-color-0) 55%, transparent), color-mix(in srgb, var(--background-color-0) 0%, transparent) 70.71%), - linear-gradient(217deg, color-mix(in srgb, var(--background-color-1) 55%, transparent), color-mix(in srgb, var(--background-color-1) 0%, transparent) 70.71%), - linear-gradient(336deg, color-mix(in srgb, var(--background-color-2) 55%, transparent), color-mix(in srgb, var(--background-color-2) 0%, transparent) 70.71%); + background: + linear-gradient( + 127deg, + color-mix(in srgb, var(--background-color-0) 55%, transparent), + color-mix(in srgb, var(--background-color-0) 0%, transparent) 70.71%), + linear-gradient( + 217deg, + color-mix(in srgb, var(--background-color-1) 55%, transparent), + color-mix(in srgb, var(--background-color-1) 0%, transparent) 70.71%), + linear-gradient( + 336deg, + color-mix(in srgb, var(--background-color-2) 55%, transparent), + color-mix(in srgb, var(--background-color-2) 0%, transparent) 70.71%); transition-property: background; transition-duration: 250ms; transition-timing-function: ease; diff --git a/src/ui/window.rs b/src/ui/window.rs index d9c8c86..42a3034 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -690,8 +690,8 @@ mod imp { } else { color_thief::ColorFormat::Rgb }, - 5, - 4, + 8, + 3, ) .unwrap(); @@ -709,14 +709,11 @@ mod imp { ) }) .enumerate() + .cycle() + .take(3) { css.push_str(&format!("--background-color-{i}: {color}; ")); } - for i in n_colors..3 { - css.push_str(&format!( - "--background-color-{i}: var(--window-bg-color); " - )); - } css.push_str("}"); window.imp().css_provider.load_from_string(&css);