[gtksourceview] gutterrenderertext: avoid half-pixel boundaries
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] gutterrenderertext: avoid half-pixel boundaries
- Date: Tue, 26 Oct 2021 23:12:19 +0000 (UTC)
commit 1acdea2101721682deff53ccb641b619659bae6b
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 26 16:12:11 2021 -0700
gutterrenderertext: avoid half-pixel boundaries
This fixes an issue where we might get different alignments for gutter
lines depending if first/last/cell are used.
Related #227
gtksourceview/gtksourcegutterrenderertext.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutterrenderertext.c b/gtksourceview/gtksourcegutterrenderertext.c
index eff0e402..103fe989 100644
--- a/gtksourceview/gtksourcegutterrenderertext.c
+++ b/gtksourceview/gtksourcegutterrenderertext.c
@@ -151,8 +151,8 @@ gtk_source_gutter_renderer_text_snapshot_line (GtkSourceGutterRenderer *renderer
gtk_snapshot_render_layout (snapshot,
gtk_widget_get_style_context (GTK_WIDGET (text)),
- x,
- y,
+ ceilf (x),
+ ceilf (y),
layout);
if (priv->is_markup)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]