summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2000-11-15 05:35:57 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-11-15 05:35:57 +0000
commit376d6c19147bd8c255e1af41f39cb1e61a7d8855 (patch)
tree4aceb3a02ab1640d2b52f02e9b1889de19df8fab /gtk
parentc72cec38f1c74bf75dfc2d41e8f37b4673d40d27 (diff)
downloadgtk+-376d6c19147bd8c255e1af41f39cb1e61a7d8855.tar.gz
use PANGO_PIXELS() to convert to pixels
2000-11-14 Havoc Pennington <hp@pobox.com> * gtk/gtktextlayout.c (add_cursor): use PANGO_PIXELS() to convert to pixels
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtktextlayout.c15
1 files changed, 9 insertions, 6 deletions
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;
}