Bug 410517 - ThemeBuilder lines are not crisp
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js
index b866bc5..8c5da8d 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js
@@ -456,11 +456,10 @@
 					

 					labely = TOP + 10 + ( count * 28 );

 					

-					var originx = component.x-padding + ( component.width + (2*padding) ) * 0.5;

-					var originy = ( component.y-padding + ( component.height + (2*padding) )/2 );

+					var originx = Math.floor(component.x-padding + ( component.width + (2*padding) )/ 2);

+					var originy = Math.floor(component.y-padding + ( component.height + (2*padding) )/ 2);

 					

-					ctx.beginPath();

-					

+					var color = 'rgba(187,0,0,0.7)';

 					switch( component.family ){

 					

 						case 'background':

@@ -469,13 +468,13 @@
 								routine. Not pleased to do this. */

 

 							ctx.beginPath();

-							ctx.moveTo( originx + 70 , labely -4 );

-							ctx.lineTo( UI_SIZE + 50, labely -4 );

-							ctx.strokeStyle = 'rgba(187,0,0,0.7)';

-							ctx.lineWidth = 0.5;

+							ctx.moveTo( originx + 70 + 0.5 , labely -4 + 0.5 );

+							ctx.lineTo( UI_SIZE + 50 + 0.5, labely -4 + 0.5 );

+							ctx.strokeStyle = color;

+							ctx.lineWidth = 1;

 							ctx.stroke();

 							

-							Component.drawArc( ctx, originx + 70 , labely -4, 3, 0, 2 * Math.PI, false, null, 'rgba(187,0,0,0.7)' );

+							Component.drawArc( ctx, originx + 70 , labely -4, 3, 0, 2 * Math.PI, false, null, color );

 

 							break;

 							

@@ -483,31 +482,30 @@
 						case 'Side':

 						

 							ctx.beginPath();

-							ctx.moveTo( originx + 30 , labely -4 );

-							ctx.lineTo( UI_SIZE + 50, labely -4 );

+							ctx.moveTo( originx + 30 + 0.5 , labely -4 + 0.5 );

+							ctx.lineTo( UI_SIZE + 50 + 0.5, labely -4 + 0.5 );

 							ctx.strokeStyle = 'rgba(187,0,0,0.7)';

-							ctx.lineWidth = 0.5;

+							ctx.lineWidth = 1;

 							ctx.stroke();

 							

-							Component.drawArc( ctx, originx + 30 , labely -4, 3, 0, 2 * Math.PI, false, null, 'rgba(187,0,0,0.7)' );

+							Component.drawArc( ctx, originx + 30 , labely -4, 3, 0, 2 * Math.PI, false, null, color );

 

 							break;

 							

 						default: 

 						

-							ctx.moveTo( originx, originy );

-							ctx.lineTo( originx, labely -4 );

-							ctx.lineTo( UI_SIZE + 50, labely -4 );

+							ctx.moveTo( originx + 0.5, originy + 0.5 );

+							ctx.lineTo( originx + 0.5, labely -4 + 0.5 );

+							ctx.lineTo( UI_SIZE + 50 + 0.5, labely -4 + 0.5 );

 							ctx.strokeStyle = 'rgba(187,0,0,0.7)';

-							ctx.lineWidth = 0.5;

+							ctx.lineWidth = 1;

 							ctx.stroke();

 							

-							Component.drawArc( ctx, originx, originy, 3, 0, 2 * Math.PI, false, null, 'rgba(187,0,0,0.7)' );

+							Component.drawArc( ctx, originx, originy, 3, 0, 2 * Math.PI, false, null, color );

 							

 							break;

 					}

 

-					ctx.closePath();

 					ctx.globalAlpha = 1; 

 					

 					Component.drawText( ctx, component.description.toUpperCase(), LEFT + 5 + x, labely, 'bold 8pt sans-serif', '#333' );	

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeComponent.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeComponent.js
index 422da43..b00903a 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeComponent.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeComponent.js
@@ -51,7 +51,7 @@
 						this.context.beginPath();

 						this.context.font = this.font;

 					    this.context.fillStyle = this.fill;

-					    this.context.fillText(this.text, this.x, this.y );

+					    this.context.fillText(this.text, this.x + 0.5, this.y + 0.5 );

 					    this.context.closePath();

 						break;

 					

@@ -59,8 +59,8 @@
 			

 						this.context.beginPath();

 						this.context.strokeStyle = this.stroke;

-						this.context.moveTo( this.x, this.y );

-						this.context.lineTo( this.x2, this.y2 );

+						this.context.moveTo( this.x + 0.5, this.y + 0.5 );

+						this.context.lineTo( this.x2 + 0.5, this.y2 + 0.5 );

 						this.context.lineWidth = this.width;

 						this.context.stroke();

 						this.context.closePath();

@@ -70,7 +70,7 @@
 						this.context.beginPath();

 						this.context.strokeStyle = this.stroke;

 						if( this.fill ){ this.context.fillStyle = this.fill; }

-						this.context.rect( this.x, this.y, this.width, this.height );

+						this.context.rect( this.x + 0.5, this.y + 0.5, this.width, this.height );

 						if( this.fill ){ this.context.fill(); }  

 						if( this.stroke ){ this.context.stroke(); }

 						this.context.closePath();

@@ -98,10 +98,10 @@
 						

 					case 'TRIANGLE':

 						this.context.beginPath();

-						this.context.moveTo( this.x, this.y );

-						this.context.lineTo( this.x2, this.y2 );

-						this.context.lineTo( this.x3, this.y3 );

-						this.context.lineTo( this.x, this.y );

+						this.context.moveTo( this.x + 0.5, this.y + 0.5 );

+						this.context.lineTo( this.x2 + 0.5, this.y2 + 0.5 );

+						this.context.lineTo( this.x3 + 0.5, this.y3 + 0.5 );

+						this.context.lineTo( this.x + 0.5, this.y + 0.5 );

 						this.context.fillStyle = this.fill;

 						this.context.fill();

 						this.context.closePath();

@@ -110,7 +110,7 @@
 					case 'ELLIPSE':	

 					

 						this.context.beginPath();

-						this.context.arc( this.x, this.y, this.radius, this.startangle, this.endangle, this.direction );

+						this.context.arc( this.x + 0.5, this.y + 0.5, this.radius, this.startangle, this.endangle, this.direction );

 						this.context.fillStyle = this.fill;

 						this.context.fill();

 						this.context.closePath();

@@ -251,7 +251,7 @@
 

 			var padding = 6;

 			

-			var originy = ( this.y-padding + (this.height + (2*padding) )/2 );

+			var originy = Math.floor( this.y-padding + (this.height + (2*padding) )/2 );

 			

 			switch( this.type ){

 				case 'RECTANGLE':

@@ -267,10 +267,10 @@
 			var originx = this.x-padding + ( this.width + (2*padding) ) * 0.5;

 			

 			this.context.beginPath();

-			this.context.moveTo( originx, originy );

-			this.context.lineTo( width + 30, originy );

-			this.context.lineTo( width + 30, top + 7 );

-			this.context.lineTo( width + 45, top + 7 );

+			this.context.moveTo( originx + 0.5, originy + 0.5 );

+			this.context.lineTo( width + 30 + 0.5, originy + 0.5 );

+			this.context.lineTo( width + 30 + 0.5, top + 7 + 0.5 );

+			this.context.lineTo( width + 45 + 0.5, top + 7 + 0.5 );

 			this.context.strokeStyle = '#cc0000';

 			this.context.lineWidth = 1;

 			this.context.stroke();

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/editor/ThemeData.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/editor/ThemeData.js
index f331487..f5cffe5 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/editor/ThemeData.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/editor/ThemeData.js
@@ -351,16 +351,6 @@
 			font: '9pt sans-serif'

 		},

 		{

-			type: 'RECTANGLE',

-			name: messages["Current Line"],

-			x: LEFT + 46,

-			y: TOP + 87,

-			width: 290,

-			height: 18,

-			family: 'currentLine',

-			fill: '#eaf2fd'

-		},

-		{

 			type: 'TEXT',

 			name: messages.Strings,

 			label: '\'Result\'',