summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1998-12-16 20:39:31 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-12-16 20:39:31 +0000
commitc1726375b1fa057637ea1b9866031df9898a6b37 (patch)
tree6e5caf4e86aa4bc6c07f608554722e2f250eb824
parentfcfe7370d8a9ac7b169282418e4f2bc58e6d9eb4 (diff)
downloadgdk-pixbuf-c1726375b1fa057637ea1b9866031df9898a6b37.tar.gz
Redraw the character under the cursor when removing the cursor.
Wed Dec 16 15:36:19 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Redraw the character under the cursor when removing the cursor.
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-06
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtkentry.c20
-rw-r--r--gtk/testgtkrc2
-rw-r--r--tests/testgtkrc2
10 files changed, 61 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 03789eac7..1e5785b20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Dec 16 15:36:19 1998 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ Redraw the character under the cursor when removing
+ the cursor.
+
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 03789eac7..1e5785b20 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,9 @@
+Wed Dec 16 15:36:19 1998 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ Redraw the character under the cursor when removing
+ the cursor.
+
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 03789eac7..1e5785b20 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Wed Dec 16 15:36:19 1998 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ Redraw the character under the cursor when removing
+ the cursor.
+
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 03789eac7..1e5785b20 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,9 @@
+Wed Dec 16 15:36:19 1998 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ Redraw the character under the cursor when removing
+ the cursor.
+
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 03789eac7..1e5785b20 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Wed Dec 16 15:36:19 1998 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ Redraw the character under the cursor when removing
+ the cursor.
+
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 03789eac7..1e5785b20 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Wed Dec 16 15:36:19 1998 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ Redraw the character under the cursor when removing
+ the cursor.
+
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 03789eac7..1e5785b20 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Wed Dec 16 15:36:19 1998 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ Redraw the character under the cursor when removing
+ the cursor.
+
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index ca5a3728e..7271156b0 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -1439,15 +1439,29 @@ gtk_entry_draw_cursor_on_drawable (GtkEntry *entry, GdkDrawable *drawable)
(editable->selection_start_pos == editable->selection_end_pos))
{
gdk_draw_line (drawable, widget->style->fg_gc[GTK_STATE_NORMAL],
- xoffset, 0, xoffset, text_area_height);
+ xoffset, INNER_BORDER,
+ xoffset, text_area_height - INNER_BORDER);
}
else
{
+ gint yoffset =
+ (text_area_height -
+ (widget->style->font->ascent + widget->style->font->descent)) / 2
+ + widget->style->font->ascent;
+
gtk_paint_flat_box (widget->style, drawable,
GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
NULL, widget, "entry_bg",
- xoffset, 0, 1, text_area_height);
- }
+ xoffset, INNER_BORDER,
+ 1, text_area_height - INNER_BORDER);
+ /* Draw the character under the cursor again */
+
+ gdk_draw_text_wc (drawable, widget->style->font,
+ widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+ xoffset, yoffset,
+ entry->text + editable->current_pos, 1);
+ }
+
#ifdef USE_XIM
if (GTK_WIDGET_HAS_FOCUS(widget) && gdk_im_ready() && editable->ic &&
diff --git a/gtk/testgtkrc b/gtk/testgtkrc
index 065b00cac..b8c6a8ce9 100644
--- a/gtk/testgtkrc
+++ b/gtk/testgtkrc
@@ -17,7 +17,7 @@ pixmap_path "."
style "defaultfont"
{
- fontset = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
+ fontset = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*,*"
# font = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
}
diff --git a/tests/testgtkrc b/tests/testgtkrc
index 065b00cac..b8c6a8ce9 100644
--- a/tests/testgtkrc
+++ b/tests/testgtkrc
@@ -17,7 +17,7 @@ pixmap_path "."
style "defaultfont"
{
- fontset = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
+ fontset = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*,*"
# font = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
}