Skip to content

Commit

Permalink
2006-04-14 Alexander Olk <alex.olk@googlemail.com>
Browse files Browse the repository at this point in the history
	* ThemeWin32Classic.cs: Fixed size grip drawing and updated StatusBar
	  drawing code to reflect the size grip changes


svn path=/trunk/mcs/; revision=59482
  • Loading branch information
Alexander Olk committed Apr 14, 2006
1 parent c2b743d commit 295388c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
@@ -1,3 +1,8 @@
2006-04-14 Alexander Olk <alex.olk@googlemail.com>

* ThemeWin32Classic.cs: Fixed size grip drawing and updated StatusBar
drawing code to reflect the size grip changes

2006-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* ImageListStreamer.cs: fix handling of the mask that follows the main
Expand Down
Expand Up @@ -3060,8 +3060,11 @@ protected virtual void ScrollBar_Horizontal_Draw_ThumbMoving_Backwards( int scro
}
}

if (sb.SizingGrip)
if (sb.SizingGrip) {
int sg_height = (area.Height / 3) * 2;
area = new Rectangle (area.Right - sg_height - 4, area.Bottom - sg_height - 1, sg_height, sg_height);
CPDrawSizeGrip (dc, ColorControl, area);
}

}

Expand Down Expand Up @@ -4962,28 +4965,16 @@ public override void CPDrawRadioButton (Graphics dc, Rectangle rectangle, Button
}


public override void CPDrawSizeGrip (Graphics dc, Color backColor, Rectangle bounds) {

Point pt = new Point (bounds.Right - 2, bounds.Bottom - 1);

Pen pen = SystemPens.ControlDark;

dc.DrawLine (pen, pt.X - 11, pt.Y, pt.X, pt.Y - 11);
dc.DrawLine (pen, pt.X - 10, pt.Y, pt.X, pt.Y - 10);

dc.DrawLine (pen, pt.X - 7, pt.Y, pt.X, pt.Y - 7);
dc.DrawLine (pen, pt.X - 6, pt.Y, pt.X, pt.Y - 6);

dc.DrawLine (pen, pt.X - 3, pt.Y, pt.X, pt.Y - 3);
dc.DrawLine (pen, pt.X - 2, pt.Y, pt.X, pt.Y - 2);

pen = SystemPens.ControlLightLight;

dc.DrawLine (pen, pt.X - 12, pt.Y, pt.X, pt.Y - 12);
dc.DrawLine (pen, pt.X - 8, pt.Y, pt.X, pt.Y - 8);
dc.DrawLine (pen, pt.X - 4, pt.Y, pt.X, pt.Y - 4);
public override void CPDrawSizeGrip (Graphics dc, Color backColor, Rectangle bounds)
{
Pen pen_dark = ResPool.GetPen(ControlPaint.Dark(backColor));
Pen pen_light_light = ResPool.GetPen(ControlPaint.LightLight(backColor));

dc.DrawLine (SystemPens.Control, pt.X - 12, pt.Y, pt.X, pt.Y);
for (int i = 2; i < bounds.Width - 2; i += 4) {
dc.DrawLine (pen_light_light, bounds.X + i, bounds.Bottom - 2, bounds.Right - 1, bounds.Y + i - 1);
dc.DrawLine (pen_dark, bounds.X + i + 1, bounds.Bottom - 2, bounds.Right - 1, bounds.Y + i);
dc.DrawLine (pen_dark, bounds.X + i + 2, bounds.Bottom - 2, bounds.Right - 1, bounds.Y + i + 1);
}
}

public override void CPDrawStringDisabled (Graphics dc, string s, Font font, Color color, RectangleF layoutRectangle, StringFormat format)
Expand Down

0 comments on commit 295388c

Please sign in to comment.