Mercurial > projects > dynamin
comparison dynamin/gui/silver_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 |
---|---|
45 private Color _darkSilver = Color(170, 170, 170); | 45 private Color _darkSilver = Color(170, 170, 170); |
46 private Color _gray = Color(150, 150, 150); | 46 private Color _gray = Color(150, 150, 150); |
47 private Color _black = Color(0, 0, 0); | 47 private Color _black = Color(0, 0, 0); |
48 private Color _white = Color(255, 255, 255); | 48 private Color _white = Color(255, 255, 255); |
49 //{{{ common | 49 //{{{ common |
50 void drawButtonBack(Graphics g, real x, real y, real width, real height, ButtonState state) { | 50 void drawButtonBack(Graphics g, double x, double y, double width, double height, ButtonState state) { |
51 with(g) { | 51 with(g) { |
52 if(state == ButtonState.Normal) | 52 if(state == ButtonState.Normal) |
53 source = _silver; | 53 source = _silver; |
54 else if(state == ButtonState.Hot) { | 54 else if(state == ButtonState.Hot) { |
55 auto grad = cairo_pattern_create_radial(width/2, height, 0, | 55 auto grad = cairo_pattern_create_radial(width/2, height, 0, |
155 rectangle(0.5, 0.5, c.width-1, c.height-1); | 155 rectangle(0.5, 0.5, c.width-1, c.height-1); |
156 stroke(); | 156 stroke(); |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 real ScrollBar_size() { | 160 double ScrollBar_size() { |
161 // TODO: all themes should get this from SystemGui.ScrollBarSize | 161 // TODO: all themes should get this from SystemGui.ScrollBarSize |
162 return 18; | 162 return 18; |
163 } | 163 } |
164 | 164 |
165 void ArrowButton_paint(ArrowButton c, Graphics g) { | 165 void ArrowButton_paint(ArrowButton c, Graphics g) { |