Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: chrome/views/button.cc

Issue 7344: Convert GetPreferredSize from:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/views/button.cc
===================================================================
--- chrome/views/button.cc (revision 3391)
+++ chrome/views/button.cc (working copy)
@@ -57,14 +57,10 @@
SchedulePaint();
}
-void Button::GetPreferredSize(CSize *result) {
- if (!images_[BS_NORMAL].isNull()) {
- result->cx = images_[BS_NORMAL].width();
- result->cy = images_[BS_NORMAL].height();
- } else {
- result->cx = kDefaultWidth;
- result->cy = kDefaultHeight;
- }
+gfx::Size Button::GetPreferredSize() {
+ if (!images_[BS_NORMAL].isNull())
+ return gfx::Size(images_[BS_NORMAL].width(), images_[BS_NORMAL].height());
+ return gfx::Size(kDefaultWidth, kDefaultHeight);
}
// Set the tooltip text for this button.

Powered by Google App Engine
This is Rietveld 408576698