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

Side by Side Diff: chrome/browser/ui/views/about_chrome_view.cc

Issue 9332006: ui/gfx: Make the first version of Canvas::TileImageInt take a gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/about_chrome_view.h" 5 #include "chrome/browser/ui/views/about_chrome_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 424
425 void AboutChromeView::OnPaint(gfx::Canvas* canvas) { 425 void AboutChromeView::OnPaint(gfx::Canvas* canvas) {
426 views::View::OnPaint(canvas); 426 views::View::OnPaint(canvas);
427 427
428 // Draw the background image color (and the separator) across the dialog. 428 // Draw the background image color (and the separator) across the dialog.
429 // This will become the background for the logo image at the top of the 429 // This will become the background for the logo image at the top of the
430 // dialog. 430 // dialog.
431 SkBitmap* background = ResourceBundle::GetSharedInstance().GetBitmapNamed( 431 SkBitmap* background = ResourceBundle::GetSharedInstance().GetBitmapNamed(
432 IDR_ABOUT_BACKGROUND_COLOR); 432 IDR_ABOUT_BACKGROUND_COLOR);
433 canvas->TileImageInt(*background, 0, 0, dialog_dimensions_.width(), 433 canvas->TileImage(*background, gfx::Rect(0, 0, dialog_dimensions_.width(),
434 background->height()); 434 background->height()));
435 435
436 gfx::Font font = 436 gfx::Font font =
437 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont); 437 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont);
438 438
439 const gfx::Rect label_bounds = main_text_label_->bounds(); 439 const gfx::Rect label_bounds = main_text_label_->bounds();
440 440
441 views::Link* link1 = 441 views::Link* link1 =
442 chromium_url_appears_first_ ? chromium_url_ : open_source_url_; 442 chromium_url_appears_first_ ? chromium_url_ : open_source_url_;
443 views::Link* link2 = 443 views::Link* link2 =
444 chromium_url_appears_first_ ? open_source_url_ : chromium_url_; 444 chromium_url_appears_first_ ? open_source_url_ : chromium_url_;
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 int height = error_label_->GetHeightForWidth( 796 int height = error_label_->GetHeightForWidth(
797 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + 797 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) +
798 views::kRelatedControlVerticalSpacing; 798 views::kRelatedControlVerticalSpacing;
799 window_rect.set_height(window_rect.height() + height); 799 window_rect.set_height(window_rect.height() + height);
800 GetWidget()->SetBounds(window_rect); 800 GetWidget()->SetBounds(window_rect);
801 801
802 return height; 802 return height;
803 } 803 }
804 804
805 #endif 805 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698