mirror of
https://github.com/elementary/gala.git
synced 2024-08-16 18:40:27 +03:00
fix Gala.Utils.create_close_button and Gala.Utils.create_refresh_button (texture.set_size) (#784)
This commit is contained in:
parent
b989fb7cb6
commit
05b445f0ca
@ -305,6 +305,7 @@ namespace Gala {
|
|||||||
Cogl.PixelFormat pixel_format = (pixbuf.get_has_alpha () ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888);
|
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);
|
image.set_data (pixbuf.get_pixels (), pixel_format, pixbuf.width, pixbuf.height, pixbuf.rowstride);
|
||||||
texture.set_content (image);
|
texture.set_content (image);
|
||||||
|
texture.set_size (pixbuf.width, pixbuf.height);
|
||||||
#else
|
#else
|
||||||
texture.set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
|
texture.set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
|
||||||
pixbuf.get_width (), pixbuf.get_height (),
|
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);
|
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);
|
image.set_data (pixbuf.get_pixels (), pixel_format, pixbuf.width, pixbuf.height, pixbuf.rowstride);
|
||||||
texture.set_content (image);
|
texture.set_content (image);
|
||||||
|
texture.set_size (pixbuf.width, pixbuf.height);
|
||||||
#else
|
#else
|
||||||
texture.set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
|
texture.set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
|
||||||
pixbuf.get_width (), pixbuf.get_height (),
|
pixbuf.get_width (), pixbuf.get_height (),
|
||||||
|
Loading…
Reference in New Issue
Block a user