mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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:
parent
cbf1d372f1
commit
4b3bbc50ff
4 changed files with 16 additions and 6 deletions
|
|
@ -818,7 +818,12 @@ export const QuickSettingsMenu = class extends PopupMenu.PopupMenu {
|
|||
|
||||
_setDimmed(dim) {
|
||||
const val = 127 * (1 + (dim ? 1 : 0) * DIM_BRIGHTNESS);
|
||||
const color = Clutter.Color.new(val, val, val, 255);
|
||||
const color = new Clutter.Color({
|
||||
red: val,
|
||||
green: val,
|
||||
blue: val,
|
||||
alpha: 255,
|
||||
});
|
||||
|
||||
this._boxPointer.ease_property('@effects.dim.brightness', color, {
|
||||
mode: Clutter.AnimationMode.LINEAR,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue