[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms/Themes DefaultThemePa
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms/Themes DefaultThemePainter.cs, 1.27, 1.28 |
Date: |
Sat, 22 Nov 2003 02:03:25 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Themes
In directory subversions:/tmp/cvs-serv32253/System.Windows.Forms/Themes
Modified Files:
DefaultThemePainter.cs
Log Message:
Draw the drop shadow portion of disabled glyphs.
Index: DefaultThemePainter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Themes/DefaultThemePainter.cs,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** DefaultThemePainter.cs 21 Nov 2003 23:35:11 -0000 1.27
--- DefaultThemePainter.cs 22 Nov 2003 02:03:22 -0000 1.28
***************
*** 911,914 ****
--- 911,916 ----
CaptionButton button, ButtonState state)
{
+ Color color;
+
// Draw the border on the button.
DrawButton(graphics, x, y, width, height, state,
***************
*** 923,928 ****
}
// Determine the color to use for the glyph.
- Color color;
if((state & ButtonState.Inactive) != 0)
{
--- 925,982 ----
}
+ // Draw the inactive drop shadow glyph on the
button.
+ if((state & ButtonState.Inactive) != 0)
+ {
+ color = SystemColors.ControlLightLight;
+ switch(button)
+ {
+ case CaptionButton.Close:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.close_button_bits,
+
Glyphs.close_button_width,
+
Glyphs.close_button_height, color);
+ }
+ break;
+
+ case CaptionButton.Minimize:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.minimize_button_bits,
+
Glyphs.minimize_button_width,
+
Glyphs.minimize_button_height, color);
+ }
+ break;
+
+ case CaptionButton.Maximize:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.maximize_button_bits,
+
Glyphs.maximize_button_width,
+
Glyphs.maximize_button_height, color);
+ }
+ break;
+
+ case CaptionButton.Restore:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.restore_button_bits,
+
Glyphs.restore_button_width,
+
Glyphs.restore_button_height, color);
+ }
+ break;
+
+ case CaptionButton.Help:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.help_button_bits,
+
Glyphs.help_button_width,
+
Glyphs.help_button_height, color);
+ }
+ break;
+ }
+ }
+
// Determine the color to use for the glyph.
if((state & ButtonState.Inactive) != 0)
{
***************
*** 1156,1159 ****
--- 1210,1218 ----
{
color = SystemColors.ControlDark;
+ DrawGlyph(graphics, x + 1, y + 1,
width, height,
+
Glyphs.drop_down_arrow_bits,
+
Glyphs.drop_down_arrow_width,
+
Glyphs.drop_down_arrow_height,
+
SystemColors.ControlLightLight);
}
else
***************
*** 1554,1563 ****
// Draw a three-state check box control.
- [TODO]
public virtual void DrawMixedCheckBox
(Graphics graphics, int x, int y, int width,
int height, ButtonState state)
{
! // TODO
}
--- 1613,1622 ----
// Draw a three-state check box control.
public virtual void DrawMixedCheckBox
(Graphics graphics, int x, int y, int width,
int height, ButtonState state)
{
! DrawCheckBox(graphics, x, y, width, height,
! state |
(ButtonState)0x10000);
}
***************
*** 1837,1840 ****
--- 1896,1900 ----
// Get the drawing color and adjust for the
pressed state.
Color color;
+ Color inactiveColor =
ControlPaint.LightLight(backColor);
if((state & ButtonState.Pushed) != 0)
{
***************
*** 1845,1853 ****
else if((state & ButtonState.Inactive) != 0)
{
! color =
ControlPaint.LightLight(foreColor);
}
else
{
color = foreColor;
}
--- 1905,1956 ----
else if((state & ButtonState.Inactive) != 0)
{
! color = ControlPaint.Dark(backColor);
}
else
{
color = foreColor;
+ }
+
+ // Draw the inactive drop-down glyph for the
button.
+ if((state & ButtonState.Inactive) != 0)
+ {
+ switch (button)
+ {
+ case ScrollButton.Up:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.up_arrow_bits,
+
Glyphs.up_arrow_width,
+
Glyphs.up_arrow_height, inactiveColor);
+ }
+ break;
+
+ case ScrollButton.Down:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.down_arrow_bits,
+
Glyphs.down_arrow_width,
+
Glyphs.down_arrow_height, inactiveColor);
+ }
+ break;
+
+ case ScrollButton.Left:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.left_arrow_bits,
+
Glyphs.left_arrow_width,
+
Glyphs.left_arrow_height, inactiveColor);
+ }
+ break;
+
+ case ScrollButton.Right:
+ {
+ DrawGlyph(graphics, x +
1, y + 1, width, height,
+
Glyphs.right_arrow_bits,
+
Glyphs.right_arrow_width,
+
Glyphs.right_arrow_height, inactiveColor);
+ }
+ break;
+ }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/System.Windows.Forms/Themes DefaultThemePainter.cs, 1.27, 1.28,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms ButtonBase.cs, 1.12, 1.13 CheckBox.cs, 1.10, 1.11 RadioButton.cs, 1.6, 1.7
- Next by Date:
[Dotgnu-pnet-commits] pnetlib ChangeLog,1.1503,1.1504
- Previous by thread:
[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms ButtonBase.cs, 1.12, 1.13 CheckBox.cs, 1.10, 1.11 RadioButton.cs, 1.6, 1.7
- Next by thread:
[Dotgnu-pnet-commits] pnetlib ChangeLog,1.1503,1.1504
- Index(es):