From 376d6c19147bd8c255e1af41f39cb1e61a7d8855 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 15 Nov 2000 05:35:57 +0000 Subject: [PATCH] use PANGO_PIXELS() to convert to pixels 2000-11-14 Havoc Pennington * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert to pixels --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtktextlayout.c | 15 +++++++++------ 8 files changed, 44 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 267e70929a..553666ae96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-11-14 Havoc Pennington + + * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert + to pixels + 2000-11-14 Havoc Pennington * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise" diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 267e70929a..553666ae96 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +2000-11-14 Havoc Pennington + + * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert + to pixels + 2000-11-14 Havoc Pennington * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise" diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 267e70929a..553666ae96 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2000-11-14 Havoc Pennington + + * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert + to pixels + 2000-11-14 Havoc Pennington * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise" diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 267e70929a..553666ae96 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +2000-11-14 Havoc Pennington + + * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert + to pixels + 2000-11-14 Havoc Pennington * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise" diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 267e70929a..553666ae96 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2000-11-14 Havoc Pennington + + * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert + to pixels + 2000-11-14 Havoc Pennington * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise" diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 267e70929a..553666ae96 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2000-11-14 Havoc Pennington + + * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert + to pixels + 2000-11-14 Havoc Pennington * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise" diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 267e70929a..553666ae96 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2000-11-14 Havoc Pennington + + * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert + to pixels + 2000-11-14 Havoc Pennington * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise" diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index fe0cb36fa1..fe5cbf31dc 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -1415,9 +1415,9 @@ add_cursor (GtkTextLayout *layout, cursor = g_new (GtkTextCursorDisplay, 1); - cursor->x = strong_pos.x / PANGO_SCALE; - cursor->y = strong_pos.y / PANGO_SCALE; - cursor->height = strong_pos.height / PANGO_SCALE; + cursor->x = PANGO_PIXELS (strong_pos.x); + cursor->y = PANGO_PIXELS (strong_pos.y); + cursor->height = PANGO_PIXELS (strong_pos.height); cursor->is_strong = TRUE; display->cursors = g_slist_prepend (display->cursors, cursor); @@ -1429,9 +1429,9 @@ add_cursor (GtkTextLayout *layout, cursor = g_new (GtkTextCursorDisplay, 1); - cursor->x = weak_pos.x / PANGO_SCALE; - cursor->y = weak_pos.y / PANGO_SCALE; - cursor->height = weak_pos.height / PANGO_SCALE; + cursor->x = PANGO_PIXELS (weak_pos.x); + cursor->y = PANGO_PIXELS (weak_pos.y); + cursor->height = PANGO_PIXELS (weak_pos.height); cursor->is_strong = FALSE; cursor->is_weak = TRUE; display->cursors = g_slist_prepend (display->cursors, cursor); @@ -1510,6 +1510,9 @@ add_preedit_attrs (GtkTextLayout *layout, case PANGO_ATTR_STRIKETHROUGH: appearance.strikethrough = ((PangoAttrInt *)attr)->value; break; + case PANGO_ATTR_RISE: + appearance.rise = ((PangoAttrInt *)attr)->value; + break; default: break; }