Index: gtk/gtkbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkbutton.c,v
retrieving revision 1.71
diff -u -r1.71 gtkbutton.c
--- gtk/gtkbutton.c	2001/10/18 23:23:34	1.71
+++ gtk/gtkbutton.c	2001/10/26 13:56:42
@@ -36,8 +36,6 @@
 #include "gtkiconfactory.h"
 #include "gtkintl.h"
 
-#define CHILD_SPACING     1
-
 static GtkBorder default_default_border = { 1, 1, 1, 1 };
 static GtkBorder default_default_outside_border = { 0, 0, 0, 0 };
 
@@ -658,9 +656,13 @@
   GtkButton *button = GTK_BUTTON (widget);
   GtkBorder default_border;
   gboolean interior_focus;
+  gint focus_width;
+  gint focus_pad;
 
   gtk_button_get_props (button, &default_border, NULL, &interior_focus);
-  
+  gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, NULL);
+  gtk_widget_style_get (GTK_WIDGET (widget), "focus-padding", &focus_pad, NULL);
+ 
   requisition->width = (GTK_CONTAINER (widget)->border_width + CHILD_SPACING +
 			GTK_WIDGET (widget)->style->xthickness) * 2;
   requisition->height = (GTK_CONTAINER (widget)->border_width + CHILD_SPACING +
@@ -681,11 +683,10 @@
       requisition->width += child_requisition.width;
       requisition->height += child_requisition.height;
     }
-
-  if (interior_focus)
+  if (interior_focus) 
     {
-      requisition->width += 2;
-      requisition->height += 2;
+      requisition->width += 2*(focus_width+focus_pad);
+      requisition->height += 2*(focus_width+focus_pad);
     }
 }
 
@@ -702,7 +703,7 @@
   GtkBorder default_border;
 
   gtk_button_get_props (button, &default_border, NULL, NULL);
-  
+			    
   widget->allocation = *allocation;
 
   if (GTK_WIDGET_REALIZED (widget))
@@ -784,13 +785,17 @@
   GtkBorder default_border;
   GtkBorder default_outside_border;
   gboolean interior_focus;
+  gint focus_width;
+  gint focus_pad;
    
   if (GTK_WIDGET_DRAWABLE (widget))
     {
       button = GTK_BUTTON (widget);
 
       gtk_button_get_props (button, &default_border, &default_outside_border, &interior_focus);
-	
+      gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, NULL);
+      gtk_widget_style_get (GTK_WIDGET (widget), "focus-padding", &focus_pad, NULL);
+      	
       x = 0;
       y = 0;
       width = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2;
@@ -822,10 +827,10 @@
        
       if (!interior_focus && GTK_WIDGET_HAS_FOCUS (widget))
 	{
-	  x += 1;
-	  y += 1;
-	  width -= 2;
-	  height -= 2;
+	  x += focus_width + focus_pad;
+	  y += focus_width + focus_pad;
+	  width -= 2 * (focus_width + focus_pad);
+	  height -= 2 * (focus_width + focus_pad);
 	}
 
       shadow_type = button->depressed ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
@@ -842,22 +847,23 @@
 	{
 	  if (interior_focus)
 	    {
-	      x += widget->style->xthickness + 1;
-	      y += widget->style->ythickness + 1;
-	      width -= 2 * (widget->style->xthickness + 1);
-	      height -=  2 * (widget->style->xthickness + 1);
+	      x += widget->style->xthickness + focus_width/2 + focus_pad;
+	      y += widget->style->ythickness + focus_width/2 + focus_pad;
+	      width -= 2 * (widget->style->xthickness) + focus_width + 2 * focus_pad;
+	      height -=  2 * (widget->style->xthickness) + focus_width + 2 * focus_pad;
 	    }
 	  else
 	    {
-	      x -= 1;
-	      y -= 1;
-	      width += 2;
-	      height += 2;
+	      int focus_halfwidth = MAX (focus_width/2, (focus_width+1)/2);
+	      x -= focus_halfwidth + focus_pad;
+	      y -= focus_halfwidth + focus_pad;
+	      width += focus_width + focus_pad*2;
+	      height += focus_width + focus_pad*2;
 	    }
 
-	  gtk_paint_focus (widget->style, widget->window,
-			   area, widget, "button",
-			   x, y, width - 1, height - 1);
+	  gtk_paint_focus (widget->style, widget->window, area, widget,
+			   GTK_WIDGET_STATE (widget), "button",
+			   x, y, width, height);
 	}
     }
 }
Index: gtk/gtkbutton.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkbutton.h,v
retrieving revision 1.19
diff -u -r1.19 gtkbutton.h
--- gtk/gtkbutton.h	2001/08/27 01:05:07	1.19
+++ gtk/gtkbutton.h	2001/10/26 13:56:43
@@ -48,6 +48,9 @@
 typedef struct _GtkButton       GtkButton;
 typedef struct _GtkButtonClass  GtkButtonClass;
 
+#define CHILD_SPACING     1
+#define DEFAULT_FOCUS_PAD 1
+
 struct _GtkButton
 {
   GtkBin bin;
Index: gtk/gtkcalendar.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcalendar.c,v
retrieving revision 1.37
diff -u -r1.37 gtkcalendar.c
--- gtk/gtkcalendar.c	2001/09/20 19:35:08	1.37
+++ gtk/gtkcalendar.c	2001/10/26 13:56:48
@@ -1155,9 +1155,11 @@
   gint calendar_margin = CALENDAR_MARGIN;
   gint header_width, main_width;
   gint max_header_height = 0;
+  gint focus_width;
   
   calendar = GTK_CALENDAR (widget);
   private_data = GTK_CALENDAR_PRIVATE_DATA (widget);
+  gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, NULL);
 
   layout = gtk_widget_create_pango_layout (widget, NULL);
   
@@ -1207,12 +1209,13 @@
   /* Mainwindow labels width */
   
   private_data->max_day_char_width = 0;
+  private_data->min_day_width = 0;
   for (i = 0; i < 9; i++)
     {
       sprintf (buffer, "%d%d", i, i);
       pango_layout_set_text (layout, buffer, -1);	  
       pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
-      private_data->min_day_width = MAX (private_data->max_day_char_width,
+      private_data->min_day_width = MAX (private_data->min_day_width,
 					 logical_rect.width);
 
       private_data->max_day_char_ascent = MAX (private_data->max_label_char_ascent,
@@ -1221,7 +1224,7 @@
 						PANGO_DESCENT (logical_rect));
     }
   /* We add one to max_day_char_width to be able to make the marked day "bold" */
-  private_data->max_day_char_width = private_data->min_day_width / 2 +1;
+  private_data->max_day_char_width = private_data->min_day_width / 2 + 1;
   
   if (calendar->display_flags & GTK_CALENDAR_SHOW_DAY_NAMES)
     for (i = 0; i < 7; i++)
@@ -1247,7 +1250,8 @@
 						 logical_rect.width / 2);
       }
   
-  main_width = (7 * (private_data->min_day_width + DAY_XPAD * 2) + (DAY_XSEP * 6) + CALENDAR_MARGIN * 2
+  main_width = (7 * (private_data->min_day_width + DAY_XPAD * 2 + focus_width - 1)
+		+ (DAY_XSEP * 6) + CALENDAR_MARGIN * 2
 		+ (private_data->max_week_char_width
 		   ? private_data->max_week_char_width * 2 + DAY_XPAD * 2 + CALENDAR_XSEP * 2
 		   : 0));
@@ -1261,7 +1265,7 @@
   
   if (calendar->display_flags & GTK_CALENDAR_SHOW_HEADING)
     {
-      private_data->header_h = (max_header_height + CALENDAR_YSEP * 2);
+      private_data->header_h = (max_header_height + CALENDAR_YSEP * 2 + focus_width - 1);
     }
   else
     {
@@ -1272,7 +1276,7 @@
     {
       private_data->day_name_h = (private_data->max_label_char_ascent
 				  + private_data->max_label_char_descent
-				  + 2 * DAY_YPAD + calendar_margin);
+				  + 2 * DAY_YPAD + calendar_margin + 2 * focus_width);
       calendar_margin = CALENDAR_YSEP;
     } 
   else
@@ -1283,7 +1287,7 @@
   private_data->main_h = (CALENDAR_MARGIN + calendar_margin
 			  + 6 * (private_data->max_day_char_ascent
 				 + private_data->max_day_char_descent 
-				 + DAY_YPAD * 2)
+				 + DAY_YPAD * 2 + focus_width - 1)
 			  + DAY_YSEP * 5);
   
   /* 
@@ -1418,19 +1422,21 @@
   
   if (GTK_WIDGET_DRAWABLE (widget))
     {
+      gint focus_width;
+      gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+      
       x = 0;
       y = 0;
       gdk_window_get_size (widget->window, &width, &height);
       gdk_window_clear (widget->window);
-      
-      gdk_draw_rectangle (widget->window, 
-			  widget->style->base_gc[GTK_WIDGET_STATE (widget)],
-			  FALSE, x + 2, y + 2, width - 5, height - 5);
-      
-      gtk_draw_shadow (widget->style, widget->window,
-		       GTK_STATE_NORMAL, GTK_SHADOW_IN,
-		       x, y, width, height);
-      
+
+      if (GTK_WIDGET_HAS_FOCUS (widget))
+        {
+          gtk_paint_focus (widget->style, widget->window, NULL, widget,
+			   GTK_WIDGET_STATE (widget), "calendar",
+			   x + focus_width/2, y + focus_width/2,
+			   width - focus_width, height - focus_width);
+	}
     }
 }
 
@@ -1799,6 +1805,7 @@
   gint y_top;
   gint y_loc;
   gint day_xspace;
+  gint focus_width;
   GtkCalendarPrivateData *private_data;
   PangoLayout *layout;
   PangoRectangle logical_rect;
@@ -1809,6 +1816,8 @@
   calendar = GTK_CALENDAR (widget);
   private_data = GTK_CALENDAR_PRIVATE_DATA (widget);
 
+  gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, NULL);
+  
   /*
    * Handle freeze/thaw functionality
    */
@@ -1826,7 +1835,7 @@
   day = calendar->day[row][col];
   
   x_left = left_x_for_column (calendar, col);
-  x_loc = x_left + private_data->day_width / 2 + private_data->max_day_char_width;
+  x_loc = x_left + private_data->day_width / 2 + private_data->max_day_char_width + (focus_width - 1);
   
   y_top = top_y_for_row (calendar, row);
   
@@ -1889,9 +1898,18 @@
   if (GTK_WIDGET_HAS_FOCUS (calendar) 
       && calendar->focus_row == row && calendar->focus_col == col)
     {
-      gdk_draw_rectangle (private_data->main_win, calendar->xor_gc, 
-			  FALSE, x_left, y_top,
-			  private_data->day_width-1, day_height-1);
+	    gint focus_width;
+	    gtk_widget_style_get (GTK_WIDGET (calendar), "focus-line-width", &focus_width, NULL);
+	    gtk_paint_focus (GTK_WIDGET (calendar)->style,
+			     private_data->main_win,
+			     NULL,
+			     GTK_WIDGET (calendar),
+			     (calendar->selected_day == day) ? GTK_STATE_SELECTED : GTK_STATE_NORMAL,
+			     "calendar-day", 
+			     x_left + focus_width/2,
+			     y_top + focus_width/2,
+			     private_data->day_width - focus_width,
+			     day_height - focus_width);
     }
 
   g_object_unref (G_OBJECT (layout));
Index: gtk/gtkcheckbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcheckbutton.c,v
retrieving revision 1.35
diff -u -r1.35 gtkcheckbutton.c
--- gtk/gtkcheckbutton.c	2001/10/01 05:20:43	1.35
+++ gtk/gtkcheckbutton.c	2001/10/26 13:56:49
@@ -159,8 +159,12 @@
     {
       gint border_width;
       gint interior_focus;
+      gint focus_width;
+      gint focus_pad;
 	  
       gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+      gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+      gtk_widget_style_get (widget, "focus-padding", &focus_pad, NULL);
 
       gtk_check_button_draw_indicator (check_button, area);
       
@@ -170,22 +174,25 @@
 	  if (interior_focus)
 	    {
 	      GtkWidget *child = GTK_BIN (widget)->child;
-
+	      gint focus_halfwidth = MAX (focus_width/2, (focus_width+1)/2);
+	      
 	      if (child && GTK_WIDGET_VISIBLE (child))
 		gtk_paint_focus (widget->style, widget->window,
-				 NULL, widget, "checkbutton",
-				 child->allocation.x - 1,
-				 child->allocation.y - 1,
-				 child->allocation.width + 1,
-				 child->allocation.height + 1);
+				 NULL, widget, GTK_WIDGET_STATE (widget),
+				 "checkbutton",
+				 child->allocation.x - focus_halfwidth - focus_pad,
+				 child->allocation.y - focus_halfwidth - focus_pad,
+				 child->allocation.width + focus_width + focus_pad,
+				 child->allocation.height + focus_width + focus_pad);
 	    }
 	  else
 	    gtk_paint_focus (widget->style, widget->window,
-			     NULL, widget, "checkbutton",
-			     border_width + widget->allocation.x,
-			     border_width + widget->allocation.y,
-			     widget->allocation.width - 2 * border_width - 1,
-			     widget->allocation.height - 2 * border_width - 1);
+			     NULL, widget,
+			     GTK_WIDGET_STATE (widget), "checkbutton",
+			     border_width + widget->allocation.x + focus_width/2 + focus_pad,
+			     border_width + widget->allocation.y + focus_width/2 + focus_pad,
+			     widget->allocation.width - 2 * border_width - focus_width - 2*focus_pad,
+			     widget->allocation.height - 2 * border_width - focus_width - 2*focus_pad);
 	}
     }
 }
@@ -222,9 +229,14 @@
       gint indicator_size;
       gint indicator_spacing;
       gint border_width = GTK_CONTAINER (widget)->border_width;
-      
-      requisition->width = border_width * 2 + 2;
-      requisition->height = border_width * 2 + 2;
+      gint focus_width;
+      gint focus_pad;
+
+      gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, NULL);
+      gtk_widget_style_get (GTK_WIDGET (widget), "focus-padding", &focus_pad, NULL);
+ 
+      requisition->width = (border_width + CHILD_SPACING) * 2;
+      requisition->height = (border_width + CHILD_SPACING) * 2;
 
       child = GTK_BIN (widget)->child;
       if (child && GTK_WIDGET_VISIBLE (child))
@@ -240,10 +252,10 @@
       _gtk_check_button_get_props (GTK_CHECK_BUTTON (widget),
  				   &indicator_size, &indicator_spacing);
       
-      requisition->width += (indicator_size + indicator_spacing * 3 + 2);
+      requisition->width += (indicator_size + indicator_spacing * 3 + 2*(focus_width+focus_pad));
       
       temp = (indicator_size + indicator_spacing * 2);
-      requisition->height = MAX (requisition->height, temp) + 2;
+      requisition->height = MAX (requisition->height, temp) + 2*(focus_width+focus_pad);
     }
   else
     (* GTK_WIDGET_CLASS (parent_class)->size_request) (widget, requisition);
@@ -257,6 +269,12 @@
   GtkToggleButton *toggle_button;
   GtkButton *button;
   GtkAllocation child_allocation;
+  gint focus_pad = DEFAULT_FOCUS_PAD;
+  gint focus_width;
+  gint interior_focus;
+
+  gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
   
   g_return_if_fail (GTK_IS_CHECK_BUTTON (widget));
   g_return_if_fail (allocation != NULL);
@@ -285,15 +303,16 @@
  
 	  child_allocation.width = MIN (GTK_BIN (button)->child->requisition.width,
 					allocation->width -
-					((border_width + 1) * 2 + indicator_size + indicator_spacing * 3));
+					((border_width + focus_width + focus_pad) * 2
+					 + indicator_size + indicator_spacing * 3));
+
 	  child_allocation.height = MIN (GTK_BIN (button)->child->requisition.height,
-					 allocation->height - (border_width + 1) * 2);
-	  child_allocation.x = (border_width + indicator_size + indicator_spacing * 3 + 1 +
-				widget->allocation.x);
+					 allocation->height - (border_width + focus_width + focus_pad) * 2);
+	  child_allocation.x = (border_width + indicator_size + indicator_spacing * 3 +
+				widget->allocation.x + focus_width + focus_pad);
 	  child_allocation.y = widget->allocation.y +
-			       (allocation->height - child_allocation.height) / 2;
+		  (allocation->height - child_allocation.height) / 2;
 
-	  
 	  if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
 	    child_allocation.x = allocation->x + allocation->width
 	      - (child_allocation.x - allocation->x + child_allocation.width);
@@ -368,6 +387,9 @@
   gint x, y;
   gint indicator_size;
   gint indicator_spacing;
+  gint focus_width;
+  gint focus_pad;
+  gboolean interior_focus;
   GdkWindow *window;
   
   g_return_if_fail (GTK_IS_CHECK_BUTTON (check_button));
@@ -378,7 +400,11 @@
   if (GTK_WIDGET_DRAWABLE (check_button))
     {
       window = widget->window;
-      
+
+      gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+      gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, NULL);
+      gtk_widget_style_get (GTK_WIDGET (widget), "focus-padding", &focus_pad, NULL);
+
       _gtk_check_button_get_props (check_button, &indicator_size, &indicator_spacing);
 						    
       state_type = GTK_WIDGET_STATE (widget);
@@ -405,6 +431,11 @@
       y = widget->allocation.y + (widget->allocation.height - indicator_size) / 2;
       width = indicator_size;
       height = indicator_size;
+
+      if (!interior_focus)
+        {
+          x += focus_width + focus_pad;      
+        }
 
       state_type = GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE ? GTK_STATE_NORMAL : GTK_WIDGET_STATE (widget);
       if (GTK_TOGGLE_BUTTON (widget)->inconsistent)
Index: gtk/gtkcolorsel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcolorsel.c,v
retrieving revision 1.78
diff -u -r1.78 gtkcolorsel.c
--- gtk/gtkcolorsel.c	2001/10/11 20:37:51	1.78
+++ gtk/gtkcolorsel.c	2001/10/26 13:56:56
@@ -162,6 +162,8 @@
                                                          GdkColor          *color);
 static void     gtk_color_selection_unset_palette_color (GtkColorSelection *colorsel,
                                                          gint               index);
+static GdkGC   *get_focus_gc                            (GtkWidget         *drawing_area,
+							 gint              *focus_width);
 
 static gpointer parent_class = NULL;
 static guint color_selection_signals[LAST_SIGNAL] = { 0 };
@@ -622,7 +624,7 @@
 {
   if (drawing_area->window == NULL)
     return;
-  
+
   gdk_window_clear_area (drawing_area->window,
 			 area->x,
 			 area->y,
@@ -631,23 +633,44 @@
   
   if (GTK_WIDGET_HAS_FOCUS (drawing_area))
     {
-      GdkGC *gc;
-      gdouble color[4];
-      
-      palette_get_color (drawing_area, color);
-      
-      if (INTENSITY (color[0], color[1], color[2]) > 0.5)
-	gc = drawing_area->style->black_gc;
-      else
-	gc = drawing_area->style->white_gc;
-
+      gint focus_width = 1;
+      GdkGC *gc = get_focus_gc (drawing_area, &focus_width);
       gdk_draw_rectangle (drawing_area->window,
-			  gc, FALSE, 0, 0,
-			  drawing_area->allocation.width - 1,
-			  drawing_area->allocation.height - 1);
+			  gc, FALSE, focus_width/2, focus_width/2,
+			  drawing_area->allocation.width - focus_width,
+			  drawing_area->allocation.height - focus_width);
     }
 }
 
+static GdkGC *
+get_focus_gc (GtkWidget *drawing_area, gint *focus_width)
+{
+  GdkGC *gc = gdk_gc_new(gtk_widget_get_parent_window (drawing_area));
+  gdouble color[4];
+  gint8 *dash_list;
+  
+  gtk_widget_style_get (drawing_area,
+			"focus-line-width", focus_width,
+			NULL);
+
+  gtk_widget_style_get (drawing_area,
+			"focus-line-pattern", (gchar *)&dash_list,
+			NULL);
+
+      
+  palette_get_color (drawing_area, color);
+      
+  if (INTENSITY (color[0], color[1], color[2]) > 0.5)
+    gdk_gc_copy (gc, drawing_area->style->black_gc);
+  else
+    gdk_gc_copy (gc, drawing_area->style->white_gc);
+
+  gdk_gc_set_line_attributes (gc, *focus_width, GDK_LINE_ON_OFF_DASH, 0, 0);
+
+  gdk_gc_set_dashes (gc, 0, dash_list, strlen (dash_list));
+
+  return gc;
+}
 
 static void
 palette_drag_begin (GtkWidget      *widget,
Index: gtk/gtkentry.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
retrieving revision 1.161
diff -u -r1.161 gtkentry.c
--- gtk/gtkentry.c	2001/10/23 22:43:01	1.161
+++ gtk/gtkentry.c	2001/10/26 13:57:03
@@ -23,7 +23,6 @@
  * files for a list of changes.  These files are distributed with
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
-
 #include <string.h>
 
 #include <pango/pango.h>
@@ -975,6 +974,8 @@
   GtkRequisition requisition;
   GdkWindowAttr attributes;
   gint attributes_mask;
+  gint focus_width;
+  gboolean interior_focus;
 
   g_return_if_fail (GTK_IS_ENTRY (widget));
 
@@ -982,6 +983,9 @@
   entry = GTK_ENTRY (widget);
   editable = GTK_EDITABLE (widget);
 
+  gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+  
   gtk_widget_get_child_requisition (widget, &requisition);
   
   attributes.window_type = GDK_WINDOW_CHILD;
@@ -1017,6 +1021,11 @@
       attributes.x = 0;
       attributes.y = 0;
     }
+  if (!interior_focus)
+    {
+      attributes.x += focus_width;
+      attributes.y += focus_width;
+    }
   
   attributes.width = widget->allocation.width - attributes.x * 2;
   attributes.height = requisition.height - attributes.y * 2;
@@ -1084,11 +1093,16 @@
   PangoFontMetrics *metrics;
   gint xborder, yborder;
   PangoContext *context;
+  gboolean interior_focus;
+  gint focus_width;
   
   g_return_if_fail (GTK_IS_ENTRY (widget));
   g_return_if_fail (requisition != NULL);
 
   entry = GTK_ENTRY (widget);
+
+  gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
   
   context = gtk_widget_get_pango_context (widget);
   metrics = pango_context_get_metrics (context,
@@ -1100,15 +1114,21 @@
 
   xborder = INNER_BORDER;
   yborder = INNER_BORDER;
-  
+
   if (entry->has_frame)
     {
       xborder += widget->style->xthickness;
       yborder += widget->style->ythickness;
     }
-  else
+  
+  if (!interior_focus)
     {
-      /* add 1 pixel to draw focus rect in widget->window */
+      /* add enough space to draw focus rect in widget->window */
+      xborder += focus_width;
+      yborder += focus_width;
+    }
+  else if (!entry->has_frame) /* add one for backwards compat */
+    {
       xborder += 1;
       yborder += 1;
     }
@@ -1132,9 +1152,9 @@
              gint     *yborder)
 {
   GtkWidget *widget;
-
-  widget = GTK_WIDGET (entry);
   
+  widget = GTK_WIDGET (entry);
+	  
   if (entry->has_frame)
     {
       if (xborder)
@@ -1144,11 +1164,10 @@
     }
   else
     {
-      /* 1 pixel for focus rect */
       if (xborder)
         *xborder = 1;
       if (yborder)
-        *yborder = 1;
+	*yborder = 1;
     }
 }
 
@@ -1162,12 +1181,22 @@
   gint xborder, yborder;
   GtkRequisition requisition;
   GtkWidget *widget;
+  gint focus_width;
+  gboolean interior_focus;
 
   widget = GTK_WIDGET (entry);
-  
+
+  gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+
   gtk_widget_get_child_requisition (widget, &requisition);
 
   get_borders (entry, &xborder, &yborder);
+  if (!interior_focus)
+    {
+      xborder += focus_width - 1;
+      yborder += focus_width - 1;
+    } 
 
   if (x)
     *x = xborder;
@@ -1261,10 +1290,12 @@
   gint width, height;
   GtkEntry *entry;
   gboolean interior_focus;
+  gint focus_width;
   
   g_return_if_fail (GTK_IS_ENTRY (widget));
 
   gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
 
   entry = GTK_ENTRY (widget);
   
@@ -1276,12 +1307,14 @@
 
           gdk_window_get_size (widget->window, &width, &height);
 
-          if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
+          gdk_window_clear (widget->window);
+	  
+          if (!interior_focus)
             {
-              x += 1;
-              y += 1;
-              width -= 2;
-              height -= 2;
+              x += focus_width;
+              y += focus_width;
+              width -= 2 * focus_width;
+	      height -= 2 * focus_width;
             }
 
           gtk_paint_shadow (widget->style, widget->window,
@@ -1289,15 +1322,14 @@
                             NULL, widget, "entry",
                             x, y, width, height);
         }
-      else
-        gdk_window_clear (widget->window);
         
       if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
         {
           gdk_window_get_size (widget->window, &width, &height);
           gtk_paint_focus (widget->style, widget->window, 
-                           NULL, widget, "entry",
-                           0, 0, width - 1, height - 1);
+                           NULL, widget, GTK_WIDGET_STATE (widget), "entry",
+                           focus_width/2, focus_width/2,
+			   width - focus_width, height - focus_width);
         }
     }
 }
@@ -1312,10 +1344,17 @@
   g_return_val_if_fail (event != NULL, FALSE);
 
   entry = GTK_ENTRY (widget);
+
+  if (GTK_WIDGET_HAS_FOCUS(widget) || entry->has_frame)
+    {
+      gtk_entry_draw_focus (widget);
+    }
+  else
+    {
+      gdk_window_clear (widget->window);
+    }
 
-  if (widget->window == event->window)
-    gtk_entry_draw_focus (widget);
-  else if (entry->text_area == event->window)
+  if (entry->text_area == event->window)
     {
       gtk_entry_draw_text (GTK_ENTRY (widget));
 
@@ -2577,6 +2616,7 @@
     {
       PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
       gint area_width, area_height;
+      gint area_x, area_y;
       gint x, y;
       gint start_pos, end_pos;
       
@@ -2584,12 +2624,12 @@
       
       get_layout_position (entry, &x, &y);
 
-      get_text_area_size (entry, NULL, NULL, &area_width, &area_height);
+      get_text_area_size (entry, &area_x, &area_y, &area_width, &area_height);
 
       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);
+			  area_x, area_y, area_width, area_height);
 
       gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state],       
                        x, y,
Index: gtk/gtkhsv.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkhsv.c,v
retrieving revision 1.15
diff -u -r1.15 gtkhsv.c
--- gtk/gtkhsv.c	2001/08/07 20:28:44	1.15
+++ gtk/gtkhsv.c	2001/10/26 13:57:04
@@ -109,6 +109,10 @@
 static void gtk_hsv_move           (GtkHSV          *hsv,
                                     GtkDirectionType dir);
 
+static GdkGC *gtk_hsv_get_focus_gc (GtkHSV *hsv,
+				    gint *line_width);
+
+
 static guint hsv_signals[LAST_SIGNAL];
 static GtkWidgetClass *parent_class;
 
@@ -1039,15 +1043,19 @@
   if (GTK_WIDGET_HAS_FOCUS (hsv) &&
       priv->focus_on_ring)
     {
-      gdk_rgb_gc_set_foreground (priv->gc, 0x000000);
-      
-      gdk_draw_arc (drawable, priv->gc, FALSE,
-                    -x, -y,
-                    priv->size - 1, priv->size - 1,
+      gint focus_width = 1;
+      gint focus_halfwidth;
+      GdkGC *gc = gtk_hsv_get_focus_gc (hsv, &focus_width);
+      focus_halfwidth = MAX (focus_width/2, (focus_width+1)/2);
+      
+      gdk_draw_arc (drawable, gc, FALSE,
+                    -x + focus_width/2, -y + focus_width/2,
+                    priv->size - focus_width, priv->size - focus_width,
                     0, 360 * 64);
-      gdk_draw_arc (drawable, priv->gc, FALSE,
-                    -x + priv->ring_width - 1, -y + priv->ring_width - 1,
-                    priv->size - 2 * priv->ring_width + 1, priv->size - 2 * priv->ring_width + 1,
+      gdk_draw_arc (drawable, gc, FALSE,
+                    -x + priv->ring_width - focus_halfwidth, -y + priv->ring_width - focus_halfwidth,
+                    priv->size - 2 * priv->ring_width + focus_width,
+		    priv->size - 2 * priv->ring_width + focus_width,
                     0, 360 * 64);
     }
 }
@@ -1252,9 +1260,10 @@
   if (GTK_WIDGET_HAS_FOCUS (hsv) &&
       !priv->focus_on_ring)
     {
-      gdk_rgb_gc_set_foreground (priv->gc, 0x000000);
+      gint focus_width = 1;	    
+      GdkGC *gc = gtk_hsv_get_focus_gc (hsv, &focus_width);
   
-      gdk_draw_polygon (drawable, priv->gc, FALSE, points, 3);
+      gdk_draw_polygon (drawable, gc, FALSE, points, 3);
     }
   
   /* Draw value marker */
@@ -1722,3 +1731,36 @@
   gtk_hsv_set_color (hsv, hue, sat, val);
 }
 
+static GdkGC *
+gtk_hsv_get_focus_gc (GtkHSV *hsv, gint *line_width)
+{
+  static GdkGC *focus_gc = NULL;
+
+  if (!focus_gc)
+    {
+      GtkWidget *widget = GTK_WIDGET (hsv);
+      GtkStyle *style = widget->style;
+      gdouble color[4];
+      gint8 *dash_list;
+      char *dash;
+      gint dash_list_len = 0;
+
+      focus_gc = gdk_gc_new (gtk_widget_get_parent_window (widget));
+      gdk_gc_copy (focus_gc, style->fg_gc[GTK_STATE_NORMAL]);
+      gtk_widget_style_get (widget,
+			    "focus-line-width", line_width,
+			    NULL);
+
+      gtk_widget_style_get (widget,
+			    "focus-line-pattern", (gchar *)&dash_list,
+			    NULL);
+
+      gdk_gc_set_line_attributes (focus_gc, *line_width, GDK_LINE_ON_OFF_DASH, 0, 0);
+
+      for (dash=(char*)dash_list, dash_list_len=0; *dash; ++dash, ++dash_list_len) ;
+      gdk_gc_set_dashes (focus_gc, 0, dash_list, dash_list_len);
+    }
+
+  return focus_gc;
+  
+}
Index: gtk/gtklistitem.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtklistitem.c,v
retrieving revision 1.30
diff -u -r1.30 gtklistitem.c
--- gtk/gtklistitem.c	2001/07/18 23:39:22	1.30
+++ gtk/gtklistitem.c	2001/10/26 13:57:05
@@ -449,22 +449,28 @@
   gdk_window_set_background (widget->window, 
 			     &widget->style->base[GTK_STATE_NORMAL]);
 }
-
 static void
 gtk_list_item_size_request (GtkWidget      *widget,
 			    GtkRequisition *requisition)
 {
   GtkBin *bin;
   GtkRequisition child_requisition;
+  gint focus_width;
+  gint focus_pad;
+  gboolean interior_focus;
 
   g_return_if_fail (GTK_IS_LIST_ITEM (widget));
   g_return_if_fail (requisition != NULL);
 
   bin = GTK_BIN (widget);
-
-  requisition->width = (GTK_CONTAINER (widget)->border_width +
-			widget->style->xthickness) * 2;
-  requisition->height = GTK_CONTAINER (widget)->border_width * 2;
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+  gtk_widget_style_get (widget, "focus-padding", &focus_pad, NULL);
+  gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+
+  requisition->width = 2 * (GTK_CONTAINER (widget)->border_width +
+			widget->style->xthickness + focus_width + focus_pad - 1);
+  requisition->height = 2 * (GTK_CONTAINER (widget)->border_width +
+			focus_width + focus_pad - 1);
 
   if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
     {
@@ -530,9 +536,12 @@
 		      GdkEventExpose *event)
 {
   GtkBin *bin;
+  gint focus_width;
 
   g_return_val_if_fail (widget != NULL, FALSE);
 
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+  
   if (GTK_WIDGET_DRAWABLE (widget))
     {
       bin = GTK_BIN (widget);
@@ -557,16 +566,17 @@
         {
           if (GTK_IS_LIST (widget->parent) && GTK_LIST (widget->parent)->add_mode)
             gtk_paint_focus (widget->style, widget->window,
-                             NULL, widget, "add-mode",
-                             0, 0,
-                             widget->allocation.width - 1,
-                             widget->allocation.height - 1);
+                             NULL, widget,
+			     GTK_WIDGET_STATE (widget), "add-mode",
+                             focus_width/2, focus_width/2,
+                             widget->allocation.width - focus_width,
+                             widget->allocation.height - focus_width);
           else
             gtk_paint_focus (widget->style, widget->window,
-                             NULL, widget, NULL,
-                             0, 0,
-                             widget->allocation.width - 1,
-                             widget->allocation.height - 1);
+                             NULL, widget, GTK_WIDGET_STATE (widget), NULL,
+                             focus_width/2, focus_width/2,
+                             widget->allocation.width - focus_width,
+                             widget->allocation.height - focus_width);
         }
     }
 
Index: gtk/gtknotebook.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtknotebook.c,v
retrieving revision 1.98
diff -u -r1.98 gtknotebook.c
--- gtk/gtknotebook.c	2001/09/26 20:33:23	1.98
+++ gtk/gtknotebook.c	2001/10/26 13:57:22
@@ -40,7 +40,6 @@
 #define TAB_CURVATURE  1
 #define ARROW_SIZE     12
 #define ARROW_SPACING  0
-#define FOCUS_WIDTH    1
 #define NOTEBOOK_INIT_SCROLL_DELAY (200)
 #define NOTEBOOK_SCROLL_DELAY      (100)
 
@@ -816,10 +815,12 @@
   GtkRequisition child_requisition;
   gboolean switch_page = FALSE;
   gint vis_pages;
+  gint focus_width;
 
   g_return_if_fail (GTK_IS_NOTEBOOK (widget));
   g_return_if_fail (requisition != NULL);
 
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
   notebook = GTK_NOTEBOOK (widget);
   widget->requisition.width = 0;
   widget->requisition.height = 0;
@@ -890,14 +891,14 @@
 		    case GTK_POS_TOP:
 		    case GTK_POS_BOTTOM:
 		      page->requisition.height += 2 * (notebook->tab_vborder +
-						       FOCUS_WIDTH);
+						       focus_width);
 		      tab_height = MAX (tab_height, page->requisition.height);
 		      tab_max = MAX (tab_max, page->requisition.width);
 		      break;
 		    case GTK_POS_LEFT:
 		    case GTK_POS_RIGHT:
 		      page->requisition.width += 2 * (notebook->tab_hborder +
-						      FOCUS_WIDTH);
+						      focus_width);
 		      tab_width = MAX (tab_width, page->requisition.width);
 		      tab_max = MAX (tab_max, page->requisition.height);
 		      break;
@@ -922,7 +923,7 @@
 		      widget->requisition.width < tab_width)
 		    tab_height = MAX (tab_height, ARROW_SIZE);
 
-		  padding = 2 * (TAB_CURVATURE + FOCUS_WIDTH +
+		  padding = 2 * (TAB_CURVATURE + focus_width +
 				 notebook->tab_hborder) - TAB_OVERLAP;
 		  tab_max += padding;
 		  while (children)
@@ -965,7 +966,7 @@
 		      widget->requisition.height < tab_height)
 		    tab_width = MAX (tab_width, ARROW_SPACING +2 * ARROW_SIZE);
 
-		  padding = 2 * (TAB_CURVATURE + FOCUS_WIDTH +
+		  padding = 2 * (TAB_CURVATURE + focus_width +
 				 notebook->tab_vborder) - TAB_OVERLAP;
 		  tab_max += padding;
 
@@ -1422,10 +1423,12 @@
 gtk_notebook_draw_focus (GtkWidget *widget)
 {
   GtkNotebook *notebook;
+  gint focus_width;
 
   g_return_if_fail (GTK_IS_NOTEBOOK (widget));
 
   notebook = GTK_NOTEBOOK (widget);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
 
   if (GTK_WIDGET_DRAWABLE (widget) && notebook->show_tabs &&
       notebook->focus_tab)
@@ -1435,10 +1438,10 @@
 
       page = notebook->focus_tab->data;
 
-      area.x = page->tab_label->allocation.x - 1;
-      area.y = page->tab_label->allocation.y - 1;
-      area.width = page->tab_label->allocation.width + 2;
-      area.height = page->tab_label->allocation.height + 2;
+      area.x = page->tab_label->allocation.x - focus_width;
+      area.y = page->tab_label->allocation.y - focus_width;
+      area.width = page->tab_label->allocation.width + 2*focus_width;
+      area.height = page->tab_label->allocation.height + 2*focus_width;
 
       gtk_notebook_draw_tab (GTK_NOTEBOOK (widget), page, &area);
     }
@@ -1963,27 +1966,30 @@
   if (GTK_WIDGET_DRAWABLE (notebook) && notebook->show_tabs) 
     {
       GdkRectangle area;
+      gint focus_width;
 
+      gtk_widget_style_get (GTK_WIDGET (notebook), "focus-line-width", &focus_width, NULL);
+
       if (notebook->focus_tab)
 	{
 	  GtkNotebookPage *page;
 
 	  page = notebook->focus_tab->data;
 
-	  area.x = page->tab_label->allocation.x - 1;
-	  area.y = page->tab_label->allocation.y - 1;
-	  area.width = page->tab_label->allocation.width + 2;
-	  area.height = page->tab_label->allocation.height + 2;
+	  area.x = page->tab_label->allocation.x - focus_width;
+	  area.y = page->tab_label->allocation.y - focus_width;
+	  area.width = page->tab_label->allocation.width + 2 * focus_width;
+	  area.height = page->tab_label->allocation.height + 2 * focus_width;
 
 	  gtk_notebook_draw_tab (notebook, page, &area);
 	}
 
       if (old_page)
 	{
-	  area.x = old_page->tab_label->allocation.x - 1;
-	  area.y = old_page->tab_label->allocation.y - 1;
-	  area.width = old_page->tab_label->allocation.width + 2;
-	  area.height = old_page->tab_label->allocation.height + 2;
+	  area.x = old_page->tab_label->allocation.x - focus_width;
+	  area.y = old_page->tab_label->allocation.y - focus_width;
+	  area.width = old_page->tab_label->allocation.width + 2 * focus_width;
+	  area.height = old_page->tab_label->allocation.height + 2 * focus_width;
 
 	  gtk_notebook_draw_tab (notebook, old_page, &area);
 	}
@@ -2452,12 +2458,16 @@
       if ((GTK_WIDGET_HAS_FOCUS (widget)) &&
 	  notebook->focus_tab && (notebook->focus_tab->data == page))
 	{
+          gint focus_width;
+	  gint focus_halfwidth;
+	  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+	  focus_halfwidth = MAX (focus_width/2, (focus_width + 1)/2);
 	  gtk_paint_focus (widget->style, widget->window,
-			   area, widget, "tab",
-			   page->tab_label->allocation.x - 1,
-			   page->tab_label->allocation.y - 1,
-			   page->tab_label->allocation.width + 1,
-			   page->tab_label->allocation.height + 1);
+			   area, widget, GTK_WIDGET_STATE (widget), "tab",
+			   page->tab_label->allocation.x - focus_halfwidth,
+			   page->tab_label->allocation.y - focus_halfwidth,
+			   page->tab_label->allocation.width + focus_width,
+			   page->tab_label->allocation.height + focus_width);
 	}
       if (gtk_widget_intersect (page->tab_label, area, &child_area) &&
           GTK_WIDGET_DRAWABLE (page->tab_label))
@@ -3130,13 +3140,15 @@
   gint xthickness;
   gint ythickness;
   gint padding;
+  gint focus_width;
 
   g_return_if_fail (notebook != NULL);
   g_return_if_fail (page != NULL);
   g_return_if_fail (allocation != NULL);
 
   widget = GTK_WIDGET (notebook);
-
+  
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
   xthickness = widget->style->xthickness;
   ythickness = widget->style->ythickness;
 
@@ -3211,10 +3223,10 @@
     {
     case GTK_POS_TOP:
     case GTK_POS_BOTTOM:
-      padding = TAB_CURVATURE + FOCUS_WIDTH + notebook->tab_hborder;
+      padding = TAB_CURVATURE + focus_width + notebook->tab_hborder;
       if (page->fill)
 	{
-	  child_allocation.x = (xthickness + FOCUS_WIDTH +
+	  child_allocation.x = (xthickness + focus_width +
 				notebook->tab_hborder);
 	  child_allocation.width = MAX (1, (((gint) page->allocation.width) -
 					    2 * child_allocation.x));
@@ -3227,16 +3239,16 @@
 				 tab_requisition.width) / 2);
 	  child_allocation.width = tab_requisition.width;
 	}
-      child_allocation.y = (notebook->tab_vborder + FOCUS_WIDTH +
+      child_allocation.y = (notebook->tab_vborder + focus_width +
 			    page->allocation.y);
       if (notebook->tab_pos == GTK_POS_TOP)
 	child_allocation.y += ythickness;
       child_allocation.height = MAX (1, (((gint) page->allocation.height) - ythickness -
-					 2 * (notebook->tab_vborder + FOCUS_WIDTH)));
+					 2 * (notebook->tab_vborder + focus_width)));
       break;
     case GTK_POS_LEFT:
     case GTK_POS_RIGHT:
-      padding = TAB_CURVATURE + FOCUS_WIDTH + notebook->tab_vborder;
+      padding = TAB_CURVATURE + focus_width + notebook->tab_vborder;
       if (page->fill)
 	{
 	  child_allocation.y = ythickness + padding;
@@ -3250,11 +3262,11 @@
 						      tab_requisition.height) / 2);
 	  child_allocation.height = tab_requisition.height;
 	}
-      child_allocation.x = page->allocation.x + notebook->tab_hborder + FOCUS_WIDTH;
+      child_allocation.x = page->allocation.x + notebook->tab_hborder + focus_width;
       if (notebook->tab_pos == GTK_POS_LEFT)
 	child_allocation.x += xthickness;
       child_allocation.width = MAX (1, (((gint) page->allocation.width) - xthickness -
-					2 * (notebook->tab_hborder + FOCUS_WIDTH)));
+					2 * (notebook->tab_hborder + focus_width)));
       break;
     }
 
Index: gtk/gtkoptionmenu.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkoptionmenu.c,v
retrieving revision 1.53
diff -u -r1.53 gtkoptionmenu.c
--- gtk/gtkoptionmenu.c	2001/10/16 19:45:34	1.53
+++ gtk/gtkoptionmenu.c	2001/10/26 13:57:24
@@ -360,10 +360,14 @@
 {
   GtkOptionMenu *option_menu = GTK_OPTION_MENU (widget);
   GtkOptionMenuProps props;
+  gint focus_width;
+  gint focus_pad;
   gint tmp;
   GtkRequisition child_requisition = { 0, 0 };
       
   gtk_option_menu_get_props (option_menu, &props);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+  gtk_widget_style_get (widget, "focus-padding", &focus_pad, NULL);
  
   if (GTK_BIN (option_menu)->child && GTK_WIDGET_VISIBLE (GTK_BIN (option_menu)->child))
     {
@@ -378,11 +382,11 @@
 			MAX (child_requisition.width, option_menu->width) +
  			props.indicator_size.width +
  			props.indicator_spacing.left + props.indicator_spacing.right +
-			CHILD_LEFT_SPACING + CHILD_RIGHT_SPACING + 2);
+			CHILD_LEFT_SPACING + CHILD_RIGHT_SPACING + focus_width*2);
   requisition->height = ((GTK_CONTAINER (widget)->border_width +
 			  GTK_WIDGET (widget)->style->ythickness) * 2 +
 			 MAX (child_requisition.height, option_menu->height) +
-			 CHILD_TOP_SPACING + CHILD_BOTTOM_SPACING + 2);
+			 CHILD_TOP_SPACING + CHILD_BOTTOM_SPACING + 2*focus_width);
 
   tmp = (requisition->height - option_menu->height +
 	 props.indicator_size.height + props.indicator_spacing.top + props.indicator_spacing.bottom);
@@ -431,6 +435,8 @@
   GdkRectangle button_area;
   GtkOptionMenuProps props;
   gint border_width;
+  gint focus_width;
+  gint focus_pad;
 
   g_return_if_fail (GTK_IS_OPTION_MENU (widget));
   g_return_if_fail (area != NULL);
@@ -438,6 +444,8 @@
   if (GTK_WIDGET_DRAWABLE (widget))
     {
       border_width = GTK_CONTAINER (widget)->border_width;
+      gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+      gtk_widget_style_get (widget, "focus-padding", &focus_pad, NULL);
       gtk_option_menu_get_props (GTK_OPTION_MENU (widget), &props);
 
       button_area.x = 0;
@@ -447,10 +455,10 @@
 
       if (!props.interior_focus)
 	{
-	  button_area.x += 1;
-	  button_area.y += 1;
-	  button_area.width -= 2;
-	  button_area.height -= 2;
+	  button_area.x += focus_width + focus_pad;
+	  button_area.y += focus_width + focus_pad;
+	  button_area.width -= 2*(focus_width + focus_pad);
+	  button_area.height -= 2*(focus_width + focus_pad);
 
 	  /* This is evil, and should be elimated here and in the button
 	   * code. The point is to clear the focus, and make it
@@ -479,22 +487,25 @@
 	{
 	  if (props.interior_focus)
 	    {
-	      button_area.x += widget->style->xthickness + 1;
-	      button_area.y += widget->style->ythickness + 1;
-	      button_area.width -= 2 * (widget->style->xthickness + 1)
-		+ props.indicator_spacing.left + props.indicator_spacing.right + props.indicator_size.width;
-	      button_area.height -= 2 * (widget->style->ythickness + 1);
+	      button_area.x += widget->style->xthickness + 1 + focus_width/2;
+	      button_area.y += widget->style->ythickness + 1 + focus_width/2;
+	      button_area.width -= 2 * (widget->style->xthickness) +
+		      props.indicator_spacing.left +
+		      props.indicator_spacing.right +
+		      props.indicator_size.width + focus_width;
+	      button_area.height -= 2 * (widget->style->ythickness) + focus_width;
 	    }
 	  else
 	    {
-	      button_area.x -= 1;
-	      button_area.y -= 1;
-	      button_area.width += 2;
-	      button_area.height += 2;
+	      gint focus_halfwidth = MAX (focus_width/2, (focus_width+1)/2);
+	      button_area.x -= focus_halfwidth;
+	      button_area.y -= focus_halfwidth;
+	      button_area.width += focus_width + 2 * focus_pad;
+	      button_area.height += focus_width + 2 * focus_pad;
 	    }
 	    
 	  gtk_paint_focus (widget->style, widget->window,
-			   area, widget, "button",
+			   area, widget, GTK_WIDGET_STATE (widget), "button",
 			   button_area.x, 
 			   button_area.y, 
 			   button_area.width - 1,
Index: gtk/gtkradiobutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkradiobutton.c,v
retrieving revision 1.34
diff -u -r1.34 gtkradiobutton.c
--- gtk/gtkradiobutton.c	2001/10/16 21:02:24	1.34
+++ gtk/gtkradiobutton.c	2001/10/26 13:57:27
@@ -575,6 +575,9 @@
   GdkRectangle new_area;
   gint x, y;
   gint indicator_size, indicator_spacing;
+  gint focus_width;
+  gint focus_pad = DEFAULT_FOCUS_PAD;
+  gboolean interior_focus;
 
   g_return_if_fail (GTK_IS_RADIO_BUTTON (check_button));
 
@@ -584,6 +587,9 @@
       button = GTK_BUTTON (check_button);
       toggle_button = GTK_TOGGLE_BUTTON (check_button);
 
+      gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+      gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, NULL);
+
       state_type = GTK_WIDGET_STATE (widget);
       if ((state_type != GTK_STATE_NORMAL) &&
 	  (state_type != GTK_STATE_PRELIGHT))
@@ -608,6 +614,11 @@
       
       x = widget->allocation.x + indicator_spacing + GTK_CONTAINER (widget)->border_width;
       y = widget->allocation.y + (widget->allocation.height - indicator_size) / 2;
+
+      if (!interior_focus)
+        {
+          x += focus_width + focus_pad;      
+        }
       
       if (GTK_TOGGLE_BUTTON (widget)->active)
 	shadow_type = GTK_SHADOW_IN;
Index: gtk/gtkrange.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkrange.c,v
retrieving revision 1.65
diff -u -r1.65 gtkrange.c
--- gtk/gtkrange.c	2001/07/18 23:39:23	1.65
+++ gtk/gtkrange.c	2001/10/26 13:57:33
@@ -689,14 +689,23 @@
   (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
 }
 
+
 static void
 gtk_range_size_request (GtkWidget      *widget,
                         GtkRequisition *requisition)
 {
   GtkRange *range;
   gint slider_width, stepper_size, trough_border, stepper_spacing;
+  gint focus_width;
+  gint focus_pad;
+  gboolean interior_focus;
+  gint focus_extra = 0;
   GdkRectangle range_rect;
   GtkBorder border;
+
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+  gtk_widget_style_get (widget, "focus-padding", &focus_pad, NULL);
+  gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
   
   range = GTK_RANGE (widget);
   
@@ -707,8 +716,13 @@
                           slider_width, stepper_size, trough_border, stepper_spacing,
                           &range_rect, &border, NULL, NULL);
 
-  requisition->width = range_rect.width + border.left + border.right;
-  requisition->height = range_rect.height + border.top + border.bottom;
+  /* this preserves previous sizing for exterior focus / no pad case */
+  if (!interior_focus && (focus_pad > 0))
+    {
+      focus_extra = 2 * (focus_pad + focus_width);
+    }
+  requisition->width = range_rect.width + border.left + border.right + focus_extra;
+  requisition->height = range_rect.height + border.top + border.bottom + focus_extra;
 }
 
 static void
@@ -827,10 +841,18 @@
   gboolean sensitive;
   GtkStateType state;
   GdkRectangle area;
+  gint focus_width;
+  gint focus_pad;
+  gboolean interior_focus;
+  gint focus_tmp = 0; 
   
   g_return_val_if_fail (GTK_IS_RANGE (widget), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
 
+  gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+  gtk_widget_style_get (widget, "focus-padding", &focus_pad, NULL);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+  
   range = GTK_RANGE (widget);
 
   gtk_range_calc_layout (range, range->adjustment->value);
@@ -847,26 +869,31 @@
   if (gdk_rectangle_intersect (&event->area, &range->range_rect,
                                &area))
     {
+      if (!interior_focus && (focus_pad > 0))
+        {
+          focus_tmp = focus_pad + focus_width;
+        }
       gtk_paint_box (widget->style,
                      widget->window,
                      sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE,
                      GTK_SHADOW_IN,
                      &area, GTK_WIDGET(range), "trough",
-                     range->range_rect.x,
-                     range->range_rect.y,
-                     range->range_rect.width,
-                     range->range_rect.height);
-      
+                     range->range_rect.x + focus_tmp,
+                     range->range_rect.y + focus_tmp,
+                     range->range_rect.width - focus_tmp,
+                     range->range_rect.height - focus_tmp);
                  
       if (sensitive &&
           GTK_WIDGET_HAS_FOCUS (range))
-        gtk_paint_focus (widget->style,
+        {
+          gtk_paint_focus (widget->style,
                          widget->window,
-                         &area, widget, "trough",
-                         range->range_rect.x,
-                         range->range_rect.y,
-                         range->range_rect.width,
-                         range->range_rect.height);
+                         &area, widget, GTK_WIDGET_STATE (widget), "trough",
+                         range->range_rect.x + focus_width/2,
+                         range->range_rect.y + focus_width/2,
+                         range->range_rect.width - focus_width,
+                         range->range_rect.height - focus_width);
+	}
     }
 
   if (!sensitive)
Index: gtk/gtksettings.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtksettings.c,v
retrieving revision 1.19
diff -u -r1.19 gtksettings.c
--- gtk/gtksettings.c	2001/10/04 06:48:09	1.19
+++ gtk/gtksettings.c	2001/10/26 13:57:35
@@ -188,8 +188,7 @@
 								  NULL,
 								  G_PARAM_READWRITE),
                                              NULL);
-  g_assert (result == PROP_KEY_THEME_NAME);    
-
+  g_assert (result == PROP_KEY_THEME_NAME);
   result = settings_install_property_parser (class,
                                              g_param_spec_string ("gtk-menu-bar-accel",
                                                                   _("Menu bar accelerator"),
Index: gtk/gtkspinbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkspinbutton.c,v
retrieving revision 1.77
diff -u -r1.77 gtkspinbutton.c
--- gtk/gtkspinbutton.c	2001/10/21 22:28:55	1.77
+++ gtk/gtkspinbutton.c	2001/10/26 13:57:38
@@ -571,6 +571,7 @@
   GtkEntry *entry;
   GtkSpinButton *spin_button;
   gint arrow_size;
+  gint focus_width;
   
   g_return_if_fail (requisition != NULL);
   g_return_if_fail (GTK_IS_SPIN_BUTTON (widget));
@@ -580,6 +581,7 @@
   arrow_size = spin_button_get_arrow_size (spin_button);
   
   GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
 
   if (entry->width_chars < 0)
     {
@@ -616,11 +618,14 @@
       w = MIN (string_len, max_string_len) * digit_width;
       width = MAX (width, w);
       
-      requisition->width = (width + arrow_size +
-			    2 * widget->style->xthickness);
+      requisition->width = width + arrow_size +
+			    2 * (widget->style->xthickness + (focus_width - 1));
     }
   else
-    requisition->width += arrow_size + 2 * widget->style->xthickness;
+    {
+      requisition->width += arrow_size + 2 *
+	      (widget->style->xthickness + (focus_width - 1));
+    }
 }
 
 static void
Index: gtk/gtkstyle.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkstyle.c,v
retrieving revision 1.86
diff -u -r1.86 gtkstyle.c
--- gtk/gtkstyle.c	2001/10/21 22:28:55	1.86
+++ gtk/gtkstyle.c	2001/10/26 13:57:53
@@ -241,6 +241,7 @@
 					 GdkWindow       *window,
 					 GdkRectangle    *area,
 					 GtkWidget       *widget,
+					 GtkStateType     state_type,
 					 const gchar     *detail,
 					 gint             x,
 					 gint             y,
@@ -1061,7 +1062,7 @@
   g_return_if_fail (GTK_IS_STYLE (style));
   g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_focus != NULL);
   
-  GTK_STYLE_GET_CLASS (style)->draw_focus (style, window, NULL, NULL, NULL, x, y, width, height);
+  GTK_STYLE_GET_CLASS (style)->draw_focus (style, window, NULL, NULL, GTK_STATE_NORMAL, NULL, x, y, width, height);
 }
 
 void 
@@ -3780,6 +3781,7 @@
 			GdkWindow     *window,
 			GdkRectangle  *area,
 			GtkWidget     *widget,
+			GtkStateType   state_type,
 			const gchar   *detail,
 			gint           x,
 			gint           y,
@@ -3787,18 +3789,33 @@
 			gint           height)
 {
   GdkPoint points[5];
+  gint8    *dash_list = "\1\1";
+  gint     line_width = 1;
+  GValue   value = { 0, };
+  GdkGC    *gc;
+
+  gc = style->fg_gc[state_type];
+
+  gtk_widget_style_get (widget,
+			"focus-line-width", &line_width,
+			NULL);
+
+  gtk_widget_style_get (widget,
+			"focus-line-pattern", (gchar *)&dash_list,
+			NULL);
+
   
   sanitize_size (window, &width, &height);
   
   if (area)
-    gdk_gc_set_clip_rectangle (style->black_gc, area);
+    gdk_gc_set_clip_rectangle (gc, area);
 
-  gdk_gc_set_line_attributes (style->black_gc, 1, GDK_LINE_ON_OFF_DASH, 0, 0);
+  gdk_gc_set_line_attributes (gc, line_width, GDK_LINE_ON_OFF_DASH, 0, 0);
 
   if (detail && !strcmp (detail, "add-mode"))
-    gdk_gc_set_dashes (style->black_gc, 0, "\4\4", 2);
+    gdk_gc_set_dashes (gc, 0, "\4\4", 2);
   else
-    gdk_gc_set_dashes (style->black_gc, 0, "\1\1", 2);
+    gdk_gc_set_dashes (gc, 0, dash_list, strlen (dash_list));
 
   points[0].x = x;
   points[0].y = y;
@@ -3810,11 +3827,11 @@
   points[3].y = y + height;
   points[4] = points[0];
   
-  gdk_draw_polygon (window, style->black_gc, FALSE, points, 4);
-  gdk_gc_set_line_attributes (style->black_gc, 0, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER);
+  gdk_draw_polygon (window, gc, FALSE, points, 4);
+  gdk_gc_set_line_attributes (gc, 0, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER);
 
   if (area)
-    gdk_gc_set_clip_rectangle (style->black_gc, NULL);
+    gdk_gc_set_clip_rectangle (gc, NULL);
 }
 
 static void 
@@ -4854,6 +4871,7 @@
                  GdkWindow     *window,
                  GdkRectangle  *area,
                  GtkWidget     *widget,
+		 GtkStateType   state_type,
                  const gchar   *detail,
                  gint           x,
                  gint           y,
@@ -4863,7 +4881,7 @@
   g_return_if_fail (GTK_IS_STYLE (style));
   g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_focus != NULL);
   
-  GTK_STYLE_GET_CLASS (style)->draw_focus (style, window, area, widget, detail, x, y, width, height);
+  GTK_STYLE_GET_CLASS (style)->draw_focus (style, window, area, widget, state_type, detail, x, y, width, height);
 }
 
 void
@@ -5082,11 +5100,18 @@
 			    GdkRectangle     *location,
 			    GtkTextDirection  dir)
 {
-  gint stem_width = location->height / 30 + 1;
+  gint stem_width;
   gint arrow_width = stem_width + 1;
   gint x, y;
   gint i;
-
+  gfloat cursor_line_aspect_ratio = 0.03333;
+  
+  stem_width = (gint) (location->height * cursor_line_aspect_ratio);
+  if (stem_width < 1)
+    {
+      stem_width = 1;
+    }
+  
   for (i = 0; i < stem_width; i++)
     gdk_draw_line (drawable, gc,
 		   location->x + i - stem_width / 2, location->y,
Index: gtk/gtkstyle.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkstyle.h,v
retrieving revision 1.33
diff -u -r1.33 gtkstyle.h
--- gtk/gtkstyle.h	2001/10/22 14:31:05	1.33
+++ gtk/gtkstyle.h	2001/10/26 13:57:57
@@ -342,6 +342,7 @@
 				 GdkWindow		*window,
 				 GdkRectangle		*area,
 				 GtkWidget		*widget,
+                                 GtkStateType            state_type,
 				 const gchar		*detail,
 				 gint			 x,
 				 gint			 y,
@@ -777,6 +778,7 @@
 			   GdkWindow       *window,
 			   GdkRectangle    *area,
 			   GtkWidget       *widget,
+			   GtkStateType     state_type,
 			   const gchar     *detail,
 			   gint             x,
 			   gint             y,
Index: gtk/gtktext.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktext.c,v
retrieving revision 1.106
diff -u -r1.106 gtktext.c
--- gtk/gtktext.c	2001/10/03 21:50:58	1.106
+++ gtk/gtktext.c	2001/10/26 13:58:06
@@ -1523,7 +1523,7 @@
 	  yextra -= 1;
 
 	  gtk_paint_focus (widget->style, widget->window,
-			   NULL, widget, "text",
+			   NULL, widget, GTK_WIDGET_STATE (widget), "text",
 			   0, 0,
 			   widget->allocation.width - 1,
 			   widget->allocation.height - 1);
Index: gtk/gtktextview.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextview.c,v
retrieving revision 1.134
diff -u -r1.134 gtktextview.c
--- gtk/gtktextview.c	2001/10/25 17:05:35	1.134
+++ gtk/gtktextview.c	2001/10/26 13:58:25
@@ -130,6 +130,7 @@
   PROP_INDENT,
   PROP_TABS,
   PROP_CURSOR_VISIBLE,
+  PROP_CURSOR_THICKNESS,
   LAST_PROP
 };
 
@@ -605,7 +606,12 @@
 							 TRUE,
 							 G_PARAM_READWRITE));
 
-  
+  gtk_widget_class_install_style_property (widget_class,
+					   g_param_spec_int ("cursor_line_thickness",
+							     _("Cursor line thickness"),
+							     _("Line thickness with which to draw insertion cursor"),
+							     0, 32, 1,
+							     G_PARAM_READABLE));
   /*
    * Style properties
    */
@@ -2515,6 +2521,7 @@
   GdkRectangle top_rect;
   GdkRectangle bottom_rect;
   gint focus_edge_width;
+  gint focus_width;
   gboolean interior_focus;
   
   text_view = GTK_TEXT_VIEW (widget);
@@ -2534,12 +2541,13 @@
    * windows get at least a 1x1 allocation.
    */
 
-  gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
+  gtk_widget_style_get (widget, "interior_focus", &interior_focus,
+			        "focus-line-width", &focus_width, NULL);
 
   if (interior_focus)
     focus_edge_width = 0;
   else
-    focus_edge_width = 1;
+    focus_edge_width = focus_width;
   
   width = allocation->width - focus_edge_width * 2;
 
@@ -3692,7 +3700,7 @@
       if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
         {          
           gtk_paint_focus (widget->style, widget->window,
-                           NULL, widget, "textview",
+                           NULL, widget, GTK_WIDGET_STATE (widget), "textview",
                            0, 0,
                            widget->allocation.width - 1,
                            widget->allocation.height - 1);
Index: gtk/gtktogglebutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktogglebutton.c,v
retrieving revision 1.41
diff -u -r1.41 gtktogglebutton.c
--- gtk/gtktogglebutton.c	2001/08/27 01:05:07	1.41
+++ gtk/gtktogglebutton.c	2001/10/26 13:58:27
@@ -34,6 +34,9 @@
 #define DEFAULT_TOP_POS   4
 #define DEFAULT_SPACING   7
 
+static GtkBorder default_default_border = { 1, 1, 1, 1 };
+static GtkBorder default_default_outside_border = { 0, 0, 0, 0 };
+
 enum {
   TOGGLED,
   LAST_SIGNAL
@@ -417,7 +420,12 @@
   GtkShadowType shadow_type;
   GtkStateType state_type;
   gint width, height;
+  GtkBorder default_border;
+  GtkBorder default_outside_border;
   gboolean interior_focus;
+  gint focus_width;
+  gint focus_pad;
+  
   gint x, y;
 
   button = GTK_BUTTON (widget);
@@ -426,7 +434,9 @@
   if (GTK_WIDGET_DRAWABLE (widget))
     {
       gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
-      
+      gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+      gtk_widget_style_get (widget, "focus-padding", &focus_pad, NULL);
+
       x = 0;
       y = 0;
       width = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2;
@@ -446,7 +456,7 @@
 
       if (GTK_WIDGET_CAN_DEFAULT (widget))
         {
-          x += widget->style->xthickness;
+	  x += widget->style->xthickness;
           y += widget->style->ythickness;
           width -= 2 * x + DEFAULT_SPACING;
           height -= 2 * y + DEFAULT_SPACING;
@@ -456,10 +466,10 @@
 
       if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
 	{
-	  x += 1;
-	  y += 1;
-	  width -= 2;
-	  height -= 2;
+	  x += focus_width + focus_pad;
+	  y += focus_width + focus_pad;
+	  width -= 2 * (focus_width + focus_pad);
+	  height -= 2 * (focus_width + focus_pad);
 	}
 
       state_type = GTK_WIDGET_STATE (widget);
@@ -485,22 +495,25 @@
 	{
 	  if (interior_focus)
 	    {
-	      x += widget->style->xthickness + 1;
-	      y += widget->style->xthickness + 1;
-	      width -= 2 * (widget->style->xthickness + 1);
-	      height -= 2 * (widget->style->ythickness + 1);
+	      gint focus_halfwidth = MAX (focus_width/2, (focus_width+1)/2);
+	      x += widget->style->xthickness + focus_halfwidth + focus_pad;
+	      y += widget->style->xthickness + focus_halfwidth + focus_pad;
+	      width -= 2 * (widget->style->xthickness) + focus_width + 2 * focus_pad;
+	      height -= 2 * (widget->style->ythickness) + focus_width + 2 * focus_pad;
 	    }
 	  else
 	    {
-	      x -= 1;
-	      y -= 1;
-	      width += 2;
-	      height += 2;
+	      int focus_halfwidth = MAX (focus_width/2, (focus_width+1)/2);
+	      x -= focus_halfwidth + focus_pad;
+	      y -= focus_halfwidth + focus_pad;
+	      width += focus_width + focus_pad*2;
+	      height += focus_width + focus_pad*2;
 	    }
 
 	  gtk_paint_focus (widget->style, widget->window,
-			   area, widget, "togglebutton",
-			   x, y, width - 1, height - 1);
+			   area, widget, GTK_WIDGET_STATE (widget),
+			   "togglebutton",
+			   x, y, width, height);
 	}
     }
 }
Index: gtk/gtktreeitem.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktreeitem.c,v
retrieving revision 1.51
diff -u -r1.51 gtktreeitem.c
--- gtk/gtktreeitem.c	2001/07/19 14:57:14	1.51
+++ gtk/gtktreeitem.c	2001/10/26 13:58:30
@@ -664,7 +664,8 @@
 
       if (GTK_WIDGET_HAS_FOCUS (widget))
 	gtk_paint_focus (widget->style, widget->window,
-			 NULL, widget, "treeitem",
+			 NULL, widget,
+			 GTK_WIDGET_STATE (widget), "treeitem",
 			 0, 0,
 			 widget->allocation.width - 1,
 			 widget->allocation.height - 1);
Index: gtk/gtktreeview.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktreeview.c,v
retrieving revision 1.159
diff -u -r1.159 gtktreeview.c
--- gtk/gtktreeview.c	2001/10/25 20:32:40	1.159
+++ gtk/gtktreeview.c	2001/10/26 13:58:54
@@ -393,7 +393,6 @@
 static GtkContainerClass *parent_class = NULL;
 static guint tree_view_signals [LAST_SIGNAL] = { 0 };
 
-
 
 /* GType Methods
  */
@@ -885,7 +884,6 @@
   tree_view->priv->search_equal_func = gtk_tree_view_search_equal_func;
 }
 
-
 
 /* GObject Methods
  */
@@ -2460,6 +2458,7 @@
   gint vertical_separator;
   gint horizontal_separator;
   gboolean allow_rules;
+  gint focus_width;
 
   g_return_val_if_fail (GTK_IS_TREE_VIEW (widget), FALSE);
 
@@ -2468,6 +2467,7 @@
 			"horizontal_separator", &horizontal_separator,
 			"vertical_separator", &vertical_separator,
 			"allow_rules", &allow_rules,
+			"focus-line-width", &focus_width,
 			NULL);
 
   if (tree_view->priv->tree == NULL)
@@ -2738,9 +2738,10 @@
 			       tree_view->priv->bin_window,
 			       NULL,
 			       widget,
+			       GTK_WIDGET_STATE (widget),
 			       "treeview-drop-indicator",
-			       0, BACKGROUND_FIRST_PIXEL (tree_view, tree, node),
-			       width - 1, BACKGROUND_HEIGHT (node) - 1);
+			       focus_width/2, BACKGROUND_FIRST_PIXEL (tree_view, tree, node)+focus_width/2,
+			       width - focus_width, BACKGROUND_HEIGHT (node) - focus_width);
 
               break;
             }
Index: gtk/gtktreeviewcolumn.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktreeviewcolumn.c,v
retrieving revision 1.76
diff -u -r1.76 gtktreeviewcolumn.c
--- gtk/gtktreeviewcolumn.c	2001/10/09 18:51:40	1.76
+++ gtk/gtktreeviewcolumn.c	2001/10/26 13:58:58
@@ -2145,6 +2145,8 @@
   gint full_requested_width = 0;
   gint extra_space;
   gint min_x, min_y, max_x, max_y;
+  gint focus_width;
+  gint cell_width, cell_height;
 
   min_x = G_MAXINT;
   min_y = G_MAXINT;
@@ -2153,6 +2155,8 @@
 
   real_cell_area = *cell_area;
 
+  gtk_widget_style_get (GTK_WIDGET (tree_column->button), "focus-line-width", &focus_width, NULL);
+
   /* Find out how my extra space we have to allocate */
   for (list = tree_column->cell_list; list; list = list->next)
     {
@@ -2186,6 +2190,14 @@
 
       real_cell_area.width = info->requested_width +
 	(info->expand?extra_space:0);
+      gtk_cell_renderer_get_size (info->cell,
+				  tree_column->tree_view,
+				  NULL,
+				  NULL,
+				  NULL,
+				  &cell_width,
+				  &cell_height);
+      real_cell_area.y += (real_cell_area.height - cell_height);
       if (render)
 	{
 	  gtk_cell_renderer_render (info->cell,
@@ -2215,7 +2227,7 @@
 	  if (max_y < real_cell_area.y + y_offset + height)
 	    max_y = real_cell_area.y + y_offset + height;
 	}
-      real_cell_area.x += (info->requested_width + tree_column->spacing);
+      real_cell_area.x += (info->requested_width + tree_column->spacing + focus_width - 1);
     }
   for (list = g_list_last (tree_column->cell_list); list; list = list->prev)
     {
@@ -2245,17 +2257,18 @@
       if (min_x >= max_x || min_y >= max_y)
 	{
 	  *focus_rectangle = *cell_area;
-	  focus_rectangle->x -= 1;
-	  focus_rectangle->y -= 1;
-	  focus_rectangle->width += 2;
-	  focus_rectangle->height += 2;
+	  focus_rectangle->x += focus_width/2;
+	  focus_rectangle->y += focus_width/2;
+	  focus_rectangle->width -= focus_width;
+	  focus_rectangle->height -= focus_width;
 	}
       else
 	{
-	  focus_rectangle->x = min_x - 1;
-	  focus_rectangle->y = min_y - 1;
-	  focus_rectangle->width = (max_x - min_x) + 2;
-	  focus_rectangle->height = (max_y - min_y) + 2;
+	  focus_rectangle->x = min_x - focus_width/2;
+	  focus_rectangle->y = MAX (cell_area->y + focus_width/2,
+				    min_y - focus_width/2);
+	  focus_rectangle->width = (max_x - min_x) + focus_width;
+	  focus_rectangle->height = cell_area->height - focus_width;
 	}
     }
 }
@@ -2361,22 +2374,28 @@
 				      GdkRectangle            *expose_area,
 				      guint                    flags)
 {
+  gint focus_width;	
   g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
+
+  gtk_widget_style_get (GTK_WIDGET (tree_column->button), "focus-line-width", &focus_width, NULL);
   if (tree_column->editable_widget)
     {
       /* This function is only called on the editable row when editing.
        */
-
-      gtk_paint_focus (tree_column->tree_view->style,
-		       window,
-		       NULL,
-		       tree_column->tree_view,
-		       "treeview",
-		       cell_area->x - 1,
-		       cell_area->y - 1,
-		       cell_area->width + 2 - 1,
-		       cell_area->height + 2 - 1);
-      
+      /* don't call this, since if interior_focus=TRUE we use the caret,
+       * and if interior_focus=FALSE the entry widget will draw its own
+       *	 focus rectangle..
+       * gtk_paint_focus (tree_column->tree_view->style,
+       *		       window,
+       *	       NULL,
+       *	       tree_column->tree_view,
+       *	       GTK_STATE_NORMAL,
+       *	       "treeview",
+       *	       cell_area->x - focus_width/2,
+       *	       cell_area->y - focus_width/2,
+       *	       cell_area->width + focus_width - 1,
+       *	       cell_area->height + focus_width - 1);
+       */
     }
   else
     {
@@ -2394,11 +2413,13 @@
 		       window,
 		       NULL,
 		       tree_column->tree_view,
+		       (flags && GTK_CELL_RENDERER_SELECTED) ?
+		                GTK_STATE_SELECTED : GTK_STATE_NORMAL,
 		       "treeview",
 		       focus_rectangle.x,
 		       focus_rectangle.y,
-		       focus_rectangle.width - 1,
-		       focus_rectangle.height - 1);
+		       focus_rectangle.width,
+		       focus_rectangle.height);
     }
 }
 
Index: gtk/gtkwidget.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwidget.c,v
retrieving revision 1.260
diff -u -r1.260 gtkwidget.c
--- gtk/gtkwidget.c	2001/10/22 04:34:41	1.260
+++ gtk/gtkwidget.c	2001/10/26 13:59:14
@@ -1048,6 +1048,27 @@
 								 _("Whether to draw the focus indicator inside widgets."),
 								 TRUE,
 								 G_PARAM_READABLE));
+
+  gtk_widget_class_install_style_property (klass,
+					   g_param_spec_int ("focus-line-width",
+							     _("Focus linewidth"),
+							     _("Width, in pixels, of the line drawn to indicate widget focus"),
+							     0, 10, 1,
+							     G_PARAM_READWRITE));
+
+  gtk_widget_class_install_style_property (klass,
+					   g_param_spec_string ("focus-line-pattern",
+								_("Focus line dash pattern"),
+								_("Dash pattern used to draw default focus indication"),
+								"\1\1",
+								G_PARAM_READWRITE));
+  gtk_widget_class_install_style_property (klass,
+					   g_param_spec_int ("focus-padding",
+							     _("Focus padding"),
+							     _("Width, in pixels, between focus indication line and the widget 'box'"),
+							     0, 10, 0,
+							     G_PARAM_READWRITE));
+
 }
 
 static void
