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

Side by Side Diff: chrome/browser/views/frame/status_area_view.cc

Issue 183044: Workaround Skia and Pango measuring font heights differently by asking Pango... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « app/gfx/font_skia.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/views/frame/status_area_view.h" 5 #include "chrome/browser/views/frame/status_area_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/gfx/canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/gfx/font.h" 10 #include "app/gfx/font.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ClockView::ClockView() 61 ClockView::ClockView()
62 : font_(ResourceBundle::GetSharedInstance().GetFont( 62 : font_(ResourceBundle::GetSharedInstance().GetFont(
63 ResourceBundle::BaseFont)) { 63 ResourceBundle::BaseFont)) {
64 SetNextTimer(); 64 SetNextTimer();
65 } 65 }
66 66
67 ClockView::~ClockView() { 67 ClockView::~ClockView() {
68 } 68 }
69 69
70 gfx::Size ClockView::GetPreferredSize() { 70 gfx::Size ClockView::GetPreferredSize() {
71 return gfx::Size(40, 10); 71 return gfx::Size(40, 17);
72 } 72 }
73 73
74 void ClockView::Paint(gfx::Canvas* canvas) { 74 void ClockView::Paint(gfx::Canvas* canvas) {
75 base::Time now = base::Time::Now(); 75 base::Time now = base::Time::Now();
76 base::Time::Exploded now_exploded; 76 base::Time::Exploded now_exploded;
77 now.LocalExplode(&now_exploded); 77 now.LocalExplode(&now_exploded);
78 78
79 std::wstring time_string = StringPrintf(L"%d:%02d", 79 std::wstring time_string = StringPrintf(L"%d:%02d",
80 now_exploded.hour, 80 now_exploded.hour,
81 now_exploded.minute); 81 now_exploded.minute);
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 void StatusAreaView::ExecuteCommand(int command_id) { 302 void StatusAreaView::ExecuteCommand(int command_id) {
303 browser_->ExecuteCommand(command_id); 303 browser_->ExecuteCommand(command_id);
304 } 304 }
305 305
306 void StatusAreaView::RunMenu(views::View* source, const gfx::Point& pt, 306 void StatusAreaView::RunMenu(views::View* source, const gfx::Point& pt,
307 gfx::NativeView hwnd) { 307 gfx::NativeView hwnd) {
308 CreateAppMenu(); 308 CreateAppMenu();
309 app_menu_menu_->RunMenuAt(pt, views::Menu2::ALIGN_TOPRIGHT); 309 app_menu_menu_->RunMenuAt(pt, views::Menu2::ALIGN_TOPRIGHT);
310 } 310 }
OLDNEW
« no previous file with comments | « app/gfx/font_skia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698