[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms/Themes DefaultTh
From: |
Richard Baumann <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms/Themes DefaultThemePainter.cs, 1.7, 1.8 IThemePainter.cs, 1.3, 1.4 |
Date: |
Sun, 03 Aug 2003 15:21:19 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Themes
In directory subversions:/tmp/cvs-serv2885/System.Windows.Forms/Themes
Modified Files:
DefaultThemePainter.cs IThemePainter.cs
Log Message:
Apply cleaned up and reviewed savannah patch #1785, "RadioButton
Implementation".
Index: DefaultThemePainter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Themes/DefaultThemePainter.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** DefaultThemePainter.cs 24 Jul 2003 17:50:22 -0000 1.7
--- DefaultThemePainter.cs 3 Aug 2003 19:21:17 -0000 1.8
***************
*** 1176,1183 ****
[TODO]
public virtual void DrawRadioButton
! (Graphics graphics, int x, int y, int width,
! int height, ButtonState state)
{
! // TODO
}
--- 1176,1255 ----
[TODO]
public virtual void DrawRadioButton
! (Graphics graphics, int x, int y, int width,
int height,
! ButtonState state, Color foreColor, Color
backColor,
! Brush backgroundBrush)
{
! // fill in the background
! graphics.FillRectangle(backgroundBrush, x, y,
width, height);
!
! Color lightlight =
ControlPaint.LightLight(backColor);
! Color darkdark =
ControlPaint.DarkDark(backColor);
! Color light = ControlPaint.Light(backColor);
! Color dark = ControlPaint.Dark(backColor);
!
! Color fillColor = lightlight;
! if ((state & ButtonState.Inactive) != 0)
! {
! fillColor = light;
! }
!
! // fill in center area
! using (Brush b = new SolidBrush(fillColor))
! {
! graphics.FillEllipse(b, x+1, y+1,
width-1, width-1);
! }
!
! if ((state & ButtonState.Flat) == 0)
! {
! // draw inner border
! using (Pen p = new Pen(darkdark))
! {
! graphics.DrawArc(p, x+2, y+2,
width-2, width-2, 30, 190);
! }
! using (Pen p = new Pen(light))
! {
! graphics.DrawArc(p, x+2, y+2,
width-2, width-2, 220, 180);
! }
!
! // draw outer border
! using (Pen p = new Pen(dark))
! {
! graphics.DrawArc(p, x+1, y+1,
width, width, 30, 190);
! }
! using (Pen p = new Pen(lightlight))
! {
! graphics.DrawArc(p, x+1, y+1,
width, width, 220, 180);
! }
! }
! else
! {
! // draw border
! using (Pen p = new Pen(darkdark))
! {
! graphics.DrawArc(p, x+1, y+1,
width-1, width-1, 0, 360);
! }
! }
!
! // draw check
! if ((state & ButtonState.Checked) != 0)
! {
! Color checkColor = foreColor;
! if ((state & ButtonState.Inactive) != 0)
! {
! checkColor =
ControlPaint.Light(foreColor);
! }
!
! using (Brush b = new
SolidBrush(checkColor))
! {
! if ((state & ButtonState.Flat)
!= 0)
! {
! graphics.FillEllipse(b,
x+4, y+4, 6, 6);
! }
! else
! {
! graphics.FillEllipse(b,
x+5, y+5, 5, 5);
! }
! }
! }
}
Index: IThemePainter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Themes/IThemePainter.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** IThemePainter.cs 15 Jul 2003 18:38:53 -0000 1.3
--- IThemePainter.cs 3 Aug 2003 19:21:17 -0000 1.4
***************
*** 105,110 ****
// Draw a radio button control.
! void DrawRadioButton(Graphics graphics, int x, int y, int width,
! int height, ButtonState state);
// Draw a reversible frame.
--- 105,112 ----
// Draw a radio button control.
! void DrawRadioButton
! (Graphics graphics, int x, int y, int width,
int height,
! ButtonState state, Color foreColor, Color
backColor,
! Brush backgroundBrush);
// Draw a reversible frame.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms/Themes DefaultThemePainter.cs, 1.7, 1.8 IThemePainter.cs, 1.3, 1.4,
Richard Baumann <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/samples radiobuttons.cs, NONE, 1.1 samples.build, 1.14, 1.15
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms ButtonBase.cs, 1.7, 1.8 ControlPaint.cs, 1.10, 1.11 RadioButton.cs, 1.1, 1.2
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/samples radiobuttons.cs, NONE, 1.1 samples.build, 1.14, 1.15
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms ButtonBase.cs, 1.7, 1.8 ControlPaint.cs, 1.10, 1.11 RadioButton.cs, 1.1, 1.2
- Index(es):