clutter: Drop various Color constructors
The fields are writable, there is no need to provide a custom constructor. This shapes the Color API to be similar to GdkRGBA Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3802>
This commit is contained in:

committed by
Marge Bot

parent
04842393aa
commit
74ece2ad92
@ -329,7 +329,6 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
|
||||
uint8_t red;
|
||||
uint8_t green;
|
||||
uint8_t blue;
|
||||
ClutterColor color;
|
||||
|
||||
meta_display_get_monitor_geometry (display, i, &rect);
|
||||
|
||||
@ -348,10 +347,10 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
|
||||
blue = g_rand_int_range (rand, 0, 255);
|
||||
green = g_rand_int_range (rand, 0, 255);
|
||||
red = g_rand_int_range (rand, 0, 255);
|
||||
clutter_color_init (&color, red, green, blue, 255);
|
||||
|
||||
background = meta_background_new (display);
|
||||
meta_background_set_color (background, &color);
|
||||
meta_background_set_color (background,
|
||||
&CLUTTER_COLOR_INIT (red, green, blue, 255));
|
||||
meta_background_content_set_background (background_content, background);
|
||||
g_object_unref (background);
|
||||
|
||||
|
Reference in New Issue
Block a user