summaryrefslogtreecommitdiff
path: root/gtk/gtkentry.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-07-17 23:18:29 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-07-17 23:18:29 +0000
commitb8dcd76c998315201651d7caf6452c10d1b6f9b4 (patch)
tree7b218deb9d49c935e1513291b60bd62aeb3c4f61 /gtk/gtkentry.c
parent2465ad85f9d97f15841b7d22a87fe08afc19a815 (diff)
downloadgtk+-b8dcd76c998315201651d7caf6452c10d1b6f9b4.tar.gz
Restore code to paint the background of the text area which was
Mon Jul 17 18:52:38 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_entry_draw_text): Restore code to paint the background of the text area which was accidentally removed at some point. * gtk/gtkrc.[ch] gtk/gtkstyle.[ch] gtk/gtkthemes.[ch]: - Move most of the functionality from the theme vtable into GtkRcStyleClass and GtkStyleClass. The moved vtable functions were changed a bit in the move to work better in their new home. - Get rid of the engine and engine_data fields from GtkRcStyle and GtkStyle; instead the theme engine derives theme-specific subclasses of GtkRcStyle and GtkStyle - Add extra dlsym() found entry point to themes, theme_create_rc_style(). * gtk/gtkstyle.c: Copy xthickness, ythickness fields in gtk_style_real_copy. * gtk/themes.[ch]: add a function gtk_theme_engine_register_type() to register a type associated with an engine. (The engine won't be unloaded as there is an instance of the type.)
Diffstat (limited to 'gtk/gtkentry.c')
-rw-r--r--gtk/gtkentry.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 9a3a1948a6..48a91f50dd 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -1183,13 +1183,18 @@ gtk_entry_draw_text (GtkEntry *entry)
if (GTK_WIDGET_DRAWABLE (entry))
{
PangoRectangle logical_rect;
- int area_height;
+ gint area_width, area_height;
- gdk_window_get_size (entry->text_area, NULL, &area_height);
+ gdk_window_get_size (entry->text_area, &area_width, &area_height);
area_height = PANGO_SCALE * (area_height - 2 * INNER_BORDER);
widget = GTK_WIDGET (entry);
+ gtk_paint_flat_box (widget->style, entry->text_area,
+ GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
+ NULL, widget, "entry_bg",
+ 0, 0, area_width, area_height);
+
gtk_entry_ensure_layout (entry);
line = pango_layout_get_lines (entry->layout)->data;