aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text/e-text.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-01-31 08:00:27 +0800
committerChris Lahey <clahey@src.gnome.org>2001-01-31 08:00:27 +0800
commit1a2f7014e85604838f2f369f446156b4b7af27d6 (patch)
treef3222d357dfc9d6fbc7f8d8ecdbb3e867131b62b /widgets/text/e-text.c
parent80697cc5ad12ff9397875c479eef65265f2f7215 (diff)
downloadgsoc2013-evolution-1a2f7014e85604838f2f369f446156b4b7af27d6.tar
gsoc2013-evolution-1a2f7014e85604838f2f369f446156b4b7af27d6.tar.gz
gsoc2013-evolution-1a2f7014e85604838f2f369f446156b4b7af27d6.tar.bz2
gsoc2013-evolution-1a2f7014e85604838f2f369f446156b4b7af27d6.tar.lz
gsoc2013-evolution-1a2f7014e85604838f2f369f446156b4b7af27d6.tar.xz
gsoc2013-evolution-1a2f7014e85604838f2f369f446156b4b7af27d6.tar.zst
gsoc2013-evolution-1a2f7014e85604838f2f369f446156b4b7af27d6.zip
Fixed allocation and placement of text window.
2001-01-30 Christopher James Lahey <clahey@ximian.com> * gal/e-text/e-entry.c (canvas_size_allocate, et_set_arg): Fixed allocation and placement of text window. * gal/e-text/e-text.c (e_text_draw): Fixed display of the text. svn path=/trunk/; revision=7920
Diffstat (limited to 'widgets/text/e-text.c')
-rw-r--r--widgets/text/e-text.c42
1 files changed, 26 insertions, 16 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index fbbe77dc0d..263b84b99b 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -1943,11 +1943,13 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
GdkRectangle sel_rect;
GdkGC *fg_gc;
GnomeCanvas *canvas;
+ GtkWidget *widget;
text = E_TEXT (item);
canvas = GNOME_CANVAS_ITEM(text)->canvas;
+ widget = GTK_WIDGET(canvas);
- fg_gc = GTK_WIDGET(canvas)->style->fg_gc[text->has_selection ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE];
+ fg_gc = widget->style->fg_gc[text->has_selection ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE];
if (text->draw_borders || text->draw_background) {
gdouble thisx = item->x1 - x;
@@ -1959,28 +1961,26 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
"width", &thiswidth,
"height", &thisheight,
NULL);
-
- if (text->draw_background){
- gtk_paint_flat_box (widget->style, drawable,
- GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
- NULL, widget, "entry_bg",
- thisx, thisy, thiswidth, thisheight);
- }
- if (text->editing) {
- thisx += 1;
- thisy += 1;
- thiswidth -= 2;
- thisheight -= 2;
- }
-
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 (text->editing) {
+ 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).
@@ -1990,9 +1990,19 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
*/
gtk_paint_focus (widget->style, drawable,
NULL, widget, "entry",
- thisx - 1, thisy - 1, thiswidth + 1, thisheight + 1);
+ thisx, thisy, thiswidth - 1, thisheight - 1);
}
}
+
+ if (text->draw_background) {
+ gtk_paint_flat_box (widget->style, drawable,
+ GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
+ NULL, widget, "entry_bg",
+ thisx + widget->style->klass->xthickness,
+ thisy + widget->style->klass->ythickness,
+ thiswidth - widget->style->klass->xthickness * 2,
+ thisheight - widget->style->klass->ythickness * 2);
+ }
}
if (!text->text || !text->font)