Chromium Code Reviews| Index: chrome/browser/drag_utils.cc |
| =================================================================== |
| --- chrome/browser/drag_utils.cc (revision 3391) |
| +++ chrome/browser/drag_utils.cc (working copy) |
| @@ -149,14 +149,14 @@ |
| } else { |
| button.SetIcon(icon); |
| } |
| - CSize pref; |
| - button.GetPreferredSize(&pref); |
| - button.SetBounds(0, 0, pref.cx, pref.cy); |
| + gfx::Size prefsize = button.GetPreferredSize(); |
| + button.SetBounds(gfx::Point(), prefsize); |
| // Render the image. |
| - ChromeCanvas canvas(pref.cx, pref.cy, false); |
| + ChromeCanvas canvas(prefsize.width(), prefsize.height(), false); |
|
Elliot Glaysher
2008/10/15 17:21:46
Can ChromeCanvas take a gfx::Size?
Ben Goodger (Google)
2008/10/15 17:37:32
I looked at the users of Canvas. Most of them aren
|
| button.Paint(&canvas, true); |
| - SetDragImageOnDataObject(canvas, pref.cx, pref.cy, pref.cx / 2, pref.cy / 2, |
| + SetDragImageOnDataObject(canvas, prefsize.width(), prefsize.height(), |
| + prefsize.width() / 2, prefsize.height() / 2, |
| data); |
| } |