aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-03-08 06:57:40 +0800
committerChris Toshok <toshok@src.gnome.org>2003-03-08 06:57:40 +0800
commitc8a10fa6da81431061b55c131cd3ce737ec8f1df (patch)
tree3561472bb649ea583551194bafa00da8569f98a4
parent518cb00c282a7c4d17e4b8f8106d9ef35112d89a (diff)
downloadgsoc2013-evolution-c8a10fa6da81431061b55c131cd3ce737ec8f1df.tar
gsoc2013-evolution-c8a10fa6da81431061b55c131cd3ce737ec8f1df.tar.gz
gsoc2013-evolution-c8a10fa6da81431061b55c131cd3ce737ec8f1df.tar.bz2
gsoc2013-evolution-c8a10fa6da81431061b55c131cd3ce737ec8f1df.tar.lz
gsoc2013-evolution-c8a10fa6da81431061b55c131cd3ce737ec8f1df.tar.xz
gsoc2013-evolution-c8a10fa6da81431061b55c131cd3ce737ec8f1df.tar.zst
gsoc2013-evolution-c8a10fa6da81431061b55c131cd3ce737ec8f1df.zip
fix drawing bugs, and disable the stupid looking focus rect, since I can't
2003-03-07 Chris Toshok <toshok@ximian.com> * gal/e-text/e-text.c (e_text_draw): fix drawing bugs, and disable the stupid looking focus rect, since I can't find a theme that uses them. (e_text_event): force redraw in the focus-out case if the cursor is shown (so we can erase it), and also trick ourselves into drawing it immediately (by setting it to FALSE) in the focus-in case. svn path=/trunk/; revision=20223
-rw-r--r--widgets/text/e-text.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 7a434fdcae..77be073c89 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -1279,23 +1279,18 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
if (text->draw_borders){
- if (text->editing) {
- thisx += 1;
- thisy += 1;
- thiswidth -= 2;
- thisheight -= 2;
- }
-
gtk_paint_shadow (widget->style, drawable,
GTK_STATE_NORMAL, GTK_SHADOW_IN,
NULL, widget, "entry",
thisx, thisy, thiswidth, thisheight);
+#if 1
if (text->editing) {
- thisx -= 1;
- thisy -= 1;
- thiswidth += 2;
- thisheight += 2;
+ thisx += 1;
+ thisy += 1;
+ thiswidth -= 2;
+ thisheight -= 2;
+
/*
* Chris: I am here "filling in" for the additions
* and substractions done in the previous if (text->editing).
@@ -1305,8 +1300,9 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
*/
gtk_paint_focus (widget->style, drawable, GTK_STATE_NORMAL,
NULL, widget, "entry",
- thisx, thisy, thiswidth - 1, thisheight - 1);
+ thisx, thisy, thiswidth, thisheight);
}
+#endif
}
if (text->draw_background) {
@@ -2063,12 +2059,18 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
focus_event = (GdkEventFocus *) event;
if (focus_event->in) {
start_editing (text);
+ text->show_cursor = FALSE; /* so we'll redraw and the cursor will be shown */
} else {
e_text_stop_editing (text);
if (text->timeout_id) {
g_source_remove(text->timeout_id);
text->timeout_id = 0;
}
+ if (text->show_cursor || text->draw_borders) {
+ text->show_cursor = FALSE;
+ text->needs_redraw = 1;
+ gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text));
+ }
}
if ( text->line_wrap )
text->needs_split_into_lines = 1;
@@ -2112,8 +2114,6 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
return ret;
}
- else
- return 0;
break;
case GDK_BUTTON_PRESS: /* Fall Through */
case GDK_BUTTON_RELEASE: