Mercurial > projects > dwt-win
diff dwt/widgets/ExpandBar.d @ 107:a378481be65f
Adding "static if" where necessary
author | John Reimer <terminal.node@gmail.com |
---|---|
date | Sun, 10 Feb 2008 16:54:57 -0800 |
parents | 43c42c637c9c |
children | 0a02d6d3466b |
line wrap: on
line diff
--- a/dwt/widgets/ExpandBar.d Mon Feb 11 00:56:33 2008 +0100 +++ b/dwt/widgets/ExpandBar.d Sun Feb 10 16:54:57 2008 -0800 @@ -160,7 +160,7 @@ if (hFont !is null) { hCurrentFont = hFont; } else { - if (!OS.IsWinCE) { + static if (!OS.IsWinCE) { NONCLIENTMETRICS info; info.cbSize = NONCLIENTMETRICS.sizeof; if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, &info, 0)) { @@ -283,13 +283,15 @@ } HFONT hCaptionFont, oldFont; if (hTheme is null) { - if (!OS.IsWinCE && hFont is null) { - NONCLIENTMETRICS info; - info.cbSize = NONCLIENTMETRICS.sizeof; - if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, &info, 0)) { - LOGFONT* logFont = &info.lfCaptionFont; - hCaptionFont = OS.CreateFontIndirect (logFont); - oldFont = OS.SelectObject (gc.handle, hCaptionFont); + static if (!OS.IsWinCE ) { + if (hFont is null) { + NONCLIENTMETRICS info; + info.cbSize = NONCLIENTMETRICS.sizeof; + if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, &info, 0)) { + LOGFONT* logFont = &info.lfCaptionFont; + hCaptionFont = OS.CreateFontIndirect (logFont); + oldFont = OS.SelectObject (gc.handle, hCaptionFont); + } } } } @@ -493,7 +495,7 @@ override void setBackgroundPixel (int pixel) { super.setBackgroundPixel (pixel); - if (!OS.IsWinCE) { + static if (!OS.IsWinCE) { int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN; OS.RedrawWindow (handle, null, null, flags); } @@ -507,7 +509,7 @@ override void setForegroundPixel (int pixel) { super.setForegroundPixel (pixel); - if (!OS.IsWinCE) { + static if (!OS.IsWinCE) { int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN; OS.RedrawWindow (handle, null, null, flags); }