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

Side by Side Diff: chrome/browser/chromeos/panels/panel_scroller_header.cc

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix Created 9 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/status_area_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/panels/panel_scroller_header.h" 5 #include "chrome/browser/chromeos/panels/panel_scroller_header.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/chromeos/panels/panel_scroller.h" 8 #include "chrome/browser/chromeos/panels/panel_scroller.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 22 matching lines...) Expand all
33 void PanelScrollerHeader::OnMouseCaptureLost() { 33 void PanelScrollerHeader::OnMouseCaptureLost() {
34 scroller_->HeaderClicked(this); 34 scroller_->HeaderClicked(this);
35 } 35 }
36 36
37 gfx::Size PanelScrollerHeader::GetPreferredSize() { 37 gfx::Size PanelScrollerHeader::GetPreferredSize() {
38 return gfx::Size(size().width(), 18); 38 return gfx::Size(size().width(), 18);
39 } 39 }
40 40
41 void PanelScrollerHeader::OnPaint(gfx::Canvas* canvas) { 41 void PanelScrollerHeader::OnPaint(gfx::Canvas* canvas) {
42 // TODO(brettw) fill this out with real styling. 42 // TODO(brettw) fill this out with real styling.
43 canvas->FillRectInt(0xFFFFFFFF, 0, 0, size().width(), size().height()); 43 canvas->FillRect(0xFFFFFFFF, GetLocalBounds());
44 canvas->DrawLineInt(0xFFE6E6E6, 0, size().height() - 1, 44 canvas->DrawLineInt(0xFFE6E6E6, 0, size().height() - 1,
45 size().width(), size().height() - 1); 45 size().width(), size().height() - 1);
46 46
47 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 47 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
48 gfx::Font font = 48 gfx::Font font =
49 rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD); 49 rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
50 int font_top = 1; 50 int font_top = 1;
51 canvas->DrawStringInt(title_, font, 0xFF000000, 3, font_top, 51 canvas->DrawStringInt(title_, font, 0xFF000000, 3, font_top,
52 size().width(), size().height() - font_top); 52 size().width(), size().height() - font_top);
53 } 53 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/status_area_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698