[gtksourceview/wip/albfan/gtk3-source-mark-no-attr] go to next mark if there're no attributes on mark
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/albfan/gtk3-source-mark-no-attr] go to next mark if there're no attributes on mark
- Date: Thu, 29 Sep 2022 22:48:21 +0000 (UTC)
commit 5cb70f994d4f11050622c2aecf0f92f4ff7c63ec
Author: Alberto Fanjul <albfan gnome org>
Date: Thu Sep 29 23:39:48 2022 +0200
go to next mark if there're no attributes on mark
gtksourceview/gtksourcegutterrenderermarks.c | 60 ++++++++++++++--------------
1 file changed, 29 insertions(+), 31 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutterrenderermarks.c b/gtksourceview/gtksourcegutterrenderermarks.c
index 8fdcb6df..76437893 100644
--- a/gtksourceview/gtksourcegutterrenderermarks.c
+++ b/gtksourceview/gtksourcegutterrenderermarks.c
@@ -121,40 +121,38 @@ composite_marks (GtkSourceView *view,
gtk_source_mark_get_category (mark),
NULL);
- if (attrs == NULL)
+ if (attrs != NULL)
{
- continue;
- }
+ pixbuf = gtk_source_mark_attributes_render_icon (attrs,
+ GTK_WIDGET (view),
+ size);
- pixbuf = gtk_source_mark_attributes_render_icon (attrs,
- GTK_WIDGET (view),
- size);
-
- if (pixbuf != NULL)
- {
- if (composite == NULL)
- {
- composite = gdk_pixbuf_copy (pixbuf);
- mark_width = gdk_pixbuf_get_width (composite);
- mark_height = gdk_pixbuf_get_height (composite);
- }
- else
+ if (pixbuf != NULL)
{
- gint pixbuf_w;
- gint pixbuf_h;
-
- pixbuf_w = gdk_pixbuf_get_width (pixbuf);
- pixbuf_h = gdk_pixbuf_get_height (pixbuf);
-
- gdk_pixbuf_composite (pixbuf,
- composite,
- 0, 0,
- mark_width, mark_height,
- 0, 0,
- (gdouble) pixbuf_w / mark_width,
- (gdouble) pixbuf_h / mark_height,
- GDK_INTERP_BILINEAR,
- COMPOSITE_ALPHA);
+ if (composite == NULL)
+ {
+ composite = gdk_pixbuf_copy (pixbuf);
+ mark_width = gdk_pixbuf_get_width (composite);
+ mark_height = gdk_pixbuf_get_height (composite);
+ }
+ else
+ {
+ gint pixbuf_w;
+ gint pixbuf_h;
+
+ pixbuf_w = gdk_pixbuf_get_width (pixbuf);
+ pixbuf_h = gdk_pixbuf_get_height (pixbuf);
+
+ gdk_pixbuf_composite (pixbuf,
+ composite,
+ 0, 0,
+ mark_width, mark_height,
+ 0, 0,
+ (gdouble) pixbuf_w / mark_width,
+ (gdouble) pixbuf_h / mark_height,
+ GDK_INTERP_BILINEAR,
+ COMPOSITE_ALPHA);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]