Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 6034)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 6035)
@@ -5,4 +5,5 @@
 import java.awt.BasicStroke;
 import java.awt.Color;
+import java.awt.Component;
 import java.awt.Font;
 import java.awt.FontMetrics;
@@ -28,5 +29,6 @@
 import java.util.Iterator;
 import java.util.List;
-
+import javax.swing.AbstractButton;
+import javax.swing.FocusManager;
 import javax.swing.ImageIcon;
 
@@ -319,4 +321,13 @@
 
     private Collection<WaySegment> highlightWaySegments;
+    
+    // highlight customization fields
+    private int highlightLineWidth;
+    private int highlightPointRadius;
+    private int widerHighlight;
+    private int highlightStep;
+    
+    //flag that activate wider highlight mode
+    private boolean useWiderHighlight;
 
     private boolean useStrokes;
@@ -331,4 +342,9 @@
     public StyledMapRenderer(Graphics2D g, NavigatableComponent nc, boolean isInactiveMode) {
         super(g, nc, isInactiveMode);
+
+        if (nc!=null) {
+            Component focusOwner = FocusManager.getCurrentManager().getFocusOwner();
+            useWiderHighlight = !(focusOwner instanceof AbstractButton || focusOwner == nc);
+        }
     }
 
@@ -732,5 +748,5 @@
         if (selected || member)
         {
-            Color color = null;
+            Color color;
             if (isInactiveMode || n.isDisabled()) {
                 color = inactiveColor;
@@ -845,9 +861,10 @@
             return;
         g.setColor(highlightColorTransparent);
-        float w = (line.getLineWidth() + 4);
+        float w = (line.getLineWidth() + highlightLineWidth);
+        if (useWiderHighlight) w+=widerHighlight;
         while(w >= line.getLineWidth()) {
             g.setStroke(new BasicStroke(w, line.getEndCap(), line.getLineJoin(), line.getMiterLimit()));
             g.draw(path);
-            w -= 4;
+            w -= highlightStep;
         }
     }
@@ -858,12 +875,13 @@
     private void drawPointHighlight(Point p, int size) {
         g.setColor(highlightColorTransparent);
-        int s = size + 7;
+        int s = size + highlightPointRadius;
+        if (useWiderHighlight) s+=widerHighlight;
         while(s >= size) {
             int r = (int) Math.floor(s/2);
             g.fillRoundRect(p.x-r, p.y-r, s, s, r, r);
-            s -= 4;
-        }
-    }
-
+            s -= highlightStep;
+        }
+    }
+    
     public void drawRestriction(Image img, Point pVia, double vx, double vx2, double vy, double vy2, double angle, boolean selected) {
         /* rotate image with direction last node in from to */
@@ -966,5 +984,5 @@
 
         /* find the "direct" nodes before the via node */
-        Node fromNode = null;
+        Node fromNode;
         if(fromWay.firstNode() == via) {
             fromNode = fromWay.getNode(1);
@@ -1305,4 +1323,9 @@
                 Main.pref.getBoolean("mappaint.use-antialiasing", true) ?
                         RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);
+
+        highlightLineWidth = Main.pref.getInteger("mappaint.highlight.width", 4);
+        highlightPointRadius = Main.pref.getInteger("mappaint.highlight.radius", 7);
+        widerHighlight = Main.pref.getInteger("mappaint.highlight.bigger-increment", 5);
+        highlightStep = Main.pref.getInteger("mappaint.highlight.step", 4);
     }
 
