[gnome-builder/wip/libide] libide: take line height into account when translating yalign
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: take line height into account when translating yalign
- Date: Tue, 10 Mar 2015 00:49:54 +0000 (UTC)
commit 020b237bd7915572d30d06598c16449ee3468f10
Author: Christian Hergert <christian hergert me>
Date: Mon Mar 9 17:49:44 2015 -0700
libide: take line height into account when translating yalign
libide/ide-source-view.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 72b180a..b82223d 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -3955,8 +3955,8 @@ ide_source_view_scroll_to_iter (IdeSourceView *self,
* now convert those back to alignments in the real visible area, but leave
* enough space for an input character.
*/
- yalign = yoffset / (gdouble)real_visible_rect.height;
xalign = xoffset / (gdouble)real_visible_rect.width;
+ yalign = yoffset / (gdouble)(real_visible_rect.height + priv->cached_char_height);
yvalue = iter_rect.y - (yalign * real_visible_rect.height);
xvalue = iter_rect.x - (xalign * real_visible_rect.width);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]