Mercurial > projects > dynamin
comparison dynamin/gui/windows_theme.d @ 104:5c8c1c2e12c0
Change from real to double.
double is not dependant on the platform, and it uses less space.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Fri, 06 Jul 2012 18:39:45 -0500 |
parents | 73060bc3f004 |
children | acdbb30fee7e |
comparison
equal
deleted
inserted
replaced
103:73060bc3f004 | 104:5c8c1c2e12c0 |
---|---|
160 else if(c.state == ButtonState.Pressed) | 160 else if(c.state == ButtonState.Pressed) |
161 return pressed; | 161 return pressed; |
162 } | 162 } |
163 | 163 |
164 /// draws a classic check, which is 7 wide and 7 high | 164 /// draws a classic check, which is 7 wide and 7 high |
165 void drawCheck(Graphics g, real x, real y) { | 165 void drawCheck(Graphics g, double x, double y) { |
166 g.source = getColor(COLOR_WINDOWTEXT); | 166 g.source = getColor(COLOR_WINDOWTEXT); |
167 auto checkYs = [2, 3, 4, 3, 2, 1, 0]; | 167 auto checkYs = [2, 3, 4, 3, 2, 1, 0]; |
168 foreach(i, cy; checkYs) { | 168 foreach(i, cy; checkYs) { |
169 g.moveTo(x + i + 0.5, y + cy); | 169 g.moveTo(x + i + 0.5, y + cy); |
170 g.lineTo(x + i + 0.5, y + cy + 3); | 170 g.lineTo(x + i + 0.5, y + cy + 3); |
171 g.stroke(); | 171 g.stroke(); |
172 } | 172 } |
173 } | 173 } |
174 /// draws a dotted focus rectangle | 174 /// draws a dotted focus rectangle |
175 void drawFocus(Graphics g, int colorIndex, real x, real y, real w, real h) { | 175 void drawFocus(Graphics g, int colorIndex, double x, double y, double w, double h) { |
176 g.lineWidth = 1; | 176 g.lineWidth = 1; |
177 g.source = getColor(colorIndex); | 177 g.source = getColor(colorIndex); |
178 g.setDash([1, 1], 0.5); | 178 g.setDash([1, 1], 0.5); |
179 g.rectangle(x, y, w, h); | 179 g.rectangle(x, y, w, h); |
180 g.stroke(); | 180 g.stroke(); |
403 getColor(COLOR_3DLIGHT), getColor(COLOR_3DDKSHADOW)); | 403 getColor(COLOR_3DLIGHT), getColor(COLOR_3DDKSHADOW)); |
404 draw3dRectangle(g, 1, 1, c.width-2, c.height-2, | 404 draw3dRectangle(g, 1, 1, c.width-2, c.height-2, |
405 getColor(COLOR_3DHIGHLIGHT), getColor(COLOR_3DSHADOW)); | 405 getColor(COLOR_3DHIGHLIGHT), getColor(COLOR_3DSHADOW)); |
406 } | 406 } |
407 | 407 |
408 real ScrollBar_size() { | 408 double ScrollBar_size() { |
409 // TODO: all themes should get this from SystemGui.ScrollBarSize | 409 // TODO: all themes should get this from SystemGui.ScrollBarSize |
410 version(Windows) | 410 version(Windows) |
411 return GetSystemMetrics(SM_CXVSCROLL); | 411 return GetSystemMetrics(SM_CXVSCROLL); |
412 else | 412 else |
413 return 18; | 413 return 18; |