Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <mhutch@xamarin.com>2011-10-13 17:59:30 +0400
committerMichael Hutchinson <mhutch@xamarin.com>2011-10-13 18:32:02 +0400
commiteb2b92329586f5e82e61fd6627573aae6c72ce6c (patch)
treefd29b72e257130748498d1094a5a0d10413b1776 /main/src/addins/VersionControl
parent0c53b026052907df6a272887759ae52a817b85cb (diff)
[VersionControl] Fix some fuzzy rendering and gaps
Diffstat (limited to 'main/src/addins/VersionControl')
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/CellRendererDiff.cs9
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs14
2 files changed, 12 insertions, 11 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/CellRendererDiff.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/CellRendererDiff.cs
index a0520f47f3..5940b39063 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/CellRendererDiff.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/CellRendererDiff.cs
@@ -265,8 +265,8 @@ namespace MonoDevelop.VersionControl.Views
if (block.Type != BlockType.Info && p.HasValue && p.Value.X >= cell_area.X && p.Value.X <= cell_area.Right && p.Value.Y >= block.YStart && p.Value.Y <= block.YEnd) {
int row = (p.Value.Y - block.YStart) / lineHeight;
- double yrow = block.YStart + lineHeight * row + 0.5;
- double xrow = cell_area.X + LeftPaddingBlock + 0.5;
+ double yrow = block.YStart + lineHeight * row;
+ double xrow = cell_area.X + LeftPaddingBlock;
int wrow = cell_area.Width - 1 - LeftPaddingBlock;
if (block.Type == BlockType.Added)
ctx.Color = baseAddColor.AddLight (0.1).ToCairoColor ();
@@ -414,12 +414,11 @@ namespace MonoDevelop.VersionControl.Views
if (!IsChangeBlock (block.Type))
return;
- x += 0.5;
Gdk.Color color = block.Type == BlockType.Added ? baseAddColor : baseRemoveColor;
- double y = block.YStart + 0.5;
+ double y = block.YStart;
int height = block.YEnd - block.YStart;
- double markerx = x + LeftPaddingBlock - 0.5;
+ double markerx = x + LeftPaddingBlock;
double rd = RoundedSectionRadius;
if (block.SectionStart) {
ctx.Arc (x + rd, y + rd, rd, 180 * (Math.PI / 180), 270 * (Math.PI / 180));
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs
index 06931373e3..01d5dc51c5 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs
@@ -95,19 +95,21 @@ namespace MonoDevelop.VersionControl.Views
protected override void Render (Gdk.Drawable window, Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags)
{
using (Cairo.Context cr = Gdk.CairoHelper.Create (window)) {
- cr.Arc (cell_area.X + cell_area.Width / 2, cell_area.Y + cell_area.Height / 2, 5, 0, 2 * Math.PI);
+ cr.LineWidth = 2.0;
+ double center_x = cell_area.X + Math.Round ((double) (cell_area.Width / 2d));
+ double center_y = cell_area.Y + Math.Round ((double) (cell_area.Height / 2d));
+ cr.Arc (center_x, center_y, 5, 0, 2 * Math.PI);
cr.Color = new Cairo.Color (0, 0, 0);
cr.Stroke ();
- double h = (cell_area.Height - 10) / 2;
if (!FirstNode) {
- cr.MoveTo (cell_area.X + cell_area.Width / 2, cell_area.Y - 1);
- cr.LineTo (cell_area.X + cell_area.Width / 2, cell_area.Y + h);
+ cr.MoveTo (center_x, cell_area.Y - 2);
+ cr.LineTo (center_x, center_y - 5);
cr.Stroke ();
}
if (!LastNode) {
- cr.MoveTo (cell_area.X + cell_area.Width / 2, cell_area.Y + cell_area.Height + 1);
- cr.LineTo (cell_area.X + cell_area.Width / 2, cell_area.Y + cell_area.Height - h);
+ cr.MoveTo (center_x, cell_area.Y + cell_area.Height + 2);
+ cr.LineTo (center_x, center_y + 5);
cr.Stroke ();
}
}