✨ Apply clang-format
This commit is contained in:
+6
-10
@@ -124,20 +124,16 @@ export function getStringResource(path) {
|
|||||||
export function getImageResource(path, premultiplied = false) {
|
export function getImageResource(path, premultiplied = false) {
|
||||||
const data = GdkPixbuf.Pixbuf.new_from_resource(path);
|
const data = GdkPixbuf.Pixbuf.new_from_resource(path);
|
||||||
const texture = St.ImageContent.new_with_preferred_size(data.width, data.height);
|
const texture = St.ImageContent.new_with_preferred_size(data.width, data.height);
|
||||||
const format = data.has_alpha ? (premultiplied ? Cogl.PixelFormat.RGBA_8888_PRE : Cogl.PixelFormat.RGBA_8888) : Cogl.PixelFormat.RGB_888;
|
const format = data.has_alpha ?
|
||||||
|
(premultiplied ? Cogl.PixelFormat.RGBA_8888_PRE : Cogl.PixelFormat.RGBA_8888) :
|
||||||
|
Cogl.PixelFormat.RGB_888;
|
||||||
|
|
||||||
// https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/44b84e458a22046fedb85701ea25ad08ecc0d43f
|
// https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/44b84e458a22046fedb85701ea25ad08ecc0d43f
|
||||||
if (shellVersionIsAtLeast(48, 'beta')) {
|
if (shellVersionIsAtLeast(48, 'beta')) {
|
||||||
texture.set_data(
|
texture.set_data(global.stage.context.get_backend().get_cogl_context(),
|
||||||
global.stage.context.get_backend().get_cogl_context(),
|
data.get_pixels(), format, data.width, data.height, data.rowstride);
|
||||||
data.get_pixels(),
|
|
||||||
format,
|
|
||||||
data.width, data.height, data.rowstride);
|
|
||||||
} else {
|
} else {
|
||||||
texture.set_data(
|
texture.set_data(data.get_pixels(), format, data.width, data.height, data.rowstride);
|
||||||
data.get_pixels(),
|
|
||||||
format,
|
|
||||||
data.width, data.height, data.rowstride);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return texture;
|
return texture;
|
||||||
|
|||||||
Reference in New Issue
Block a user