OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // 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 "app/gfx/canvas.h" | |
8 #include "app/gfx/font.h" | |
9 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
10 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/chromeos/panels/panel_scroller.h" | 9 #include "chrome/browser/chromeos/panels/panel_scroller.h" |
| 10 #include "gfx/canvas.h" |
| 11 #include "gfx/font.h" |
12 | 12 |
13 PanelScrollerHeader::PanelScrollerHeader(PanelScroller* scroller) | 13 PanelScrollerHeader::PanelScrollerHeader(PanelScroller* scroller) |
14 : views::View(), | 14 : views::View(), |
15 scroller_(scroller) { | 15 scroller_(scroller) { |
16 } | 16 } |
17 | 17 |
18 PanelScrollerHeader::~PanelScrollerHeader() { | 18 PanelScrollerHeader::~PanelScrollerHeader() { |
19 } | 19 } |
20 | 20 |
21 bool PanelScrollerHeader::OnMousePressed(const views::MouseEvent& event) { | 21 bool PanelScrollerHeader::OnMousePressed(const views::MouseEvent& event) { |
(...skipping 19 matching lines...) Expand all Loading... |
41 canvas->DrawLineInt(0xFFE6E6E6, 0, size().height() - 1, | 41 canvas->DrawLineInt(0xFFE6E6E6, 0, size().height() - 1, |
42 size().width(), size().height() - 1); | 42 size().width(), size().height() - 1); |
43 | 43 |
44 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 44 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
45 gfx::Font font = | 45 gfx::Font font = |
46 rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD); | 46 rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD); |
47 int font_top = 1; | 47 int font_top = 1; |
48 canvas->DrawStringInt(UTF16ToWideHack(title_), font, 0xFF000000, 3, font_top, | 48 canvas->DrawStringInt(UTF16ToWideHack(title_), font, 0xFF000000, 3, font_top, |
49 size().width(), size().height() - font_top); | 49 size().width(), size().height() - font_top); |
50 } | 50 } |
OLD | NEW |