cleanup: Prefer using Color struct constructor
Instead of Color.from_pixel or Color.new as both would be removed to simplify the Color API Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3367>
This commit is contained in:

committed by
Marge Bot

parent
cbf1d372f1
commit
4b3bbc50ff
@ -149,7 +149,12 @@ class WindowDimmer extends Clutter.BrightnessContrastEffect {
|
||||
|
||||
setDimmed(dimmed, animate) {
|
||||
let val = 127 * (1 + (dimmed ? 1 : 0) * DIM_BRIGHTNESS);
|
||||
let color = Clutter.Color.new(val, val, val, 255);
|
||||
const color = new Clutter.Color({
|
||||
red: val,
|
||||
green: val,
|
||||
blue: val,
|
||||
alpha: 255,
|
||||
});
|
||||
|
||||
this.actor.ease_property(`@effects.${this.name}.brightness`, color, {
|
||||
mode: Clutter.AnimationMode.LINEAR,
|
||||
|
Reference in New Issue
Block a user