fix Gala.Utils.create_close_button and Gala.Utils.create_refresh_button (texture.set_size) (#784)

This commit is contained in:
Javier Goday 2020-04-26 15:13:54 +02:00 committed by GitHub
parent b989fb7cb6
commit 05b445f0ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -305,6 +305,7 @@ namespace Gala {
Cogl.PixelFormat pixel_format = (pixbuf.get_has_alpha () ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888);
image.set_data (pixbuf.get_pixels (), pixel_format, pixbuf.width, pixbuf.height, pixbuf.rowstride);
texture.set_content (image);
texture.set_size (pixbuf.width, pixbuf.height);
#else
texture.set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
pixbuf.get_width (), pixbuf.get_height (),
@ -370,6 +371,7 @@ namespace Gala {
Cogl.PixelFormat pixel_format = (pixbuf.get_has_alpha () ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888);
image.set_data (pixbuf.get_pixels (), pixel_format, pixbuf.width, pixbuf.height, pixbuf.rowstride);
texture.set_content (image);
texture.set_size (pixbuf.width, pixbuf.height);
#else
texture.set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
pixbuf.get_width (), pixbuf.get_height (),