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

Side by Side Diff: chrome/browser/views/options/languages_page_view.cc

Issue 113441: ChromeFont->gfx::Font... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include <windows.h> 4 #include <windows.h>
5 #include <shlobj.h> 5 #include <shlobj.h>
6 #include <vsstyle.h> 6 #include <vsstyle.h>
7 #include <vssym32.h> 7 #include <vssym32.h>
8 8
9 #include "chrome/browser/views/options/languages_page_view.h" 9 #include "chrome/browser/views/options/languages_page_view.h"
10 10
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 void AddLanguageWindowView::Layout() { 265 void AddLanguageWindowView::Layout() {
266 gfx::Size sz = accept_language_combobox_->GetPreferredSize(); 266 gfx::Size sz = accept_language_combobox_->GetPreferredSize();
267 accept_language_combobox_->SetBounds(kDialogPadding, kDialogPadding, 267 accept_language_combobox_->SetBounds(kDialogPadding, kDialogPadding,
268 width() - 2*kDialogPadding, 268 width() - 2*kDialogPadding,
269 sz.height()); 269 sz.height());
270 } 270 }
271 271
272 gfx::Size AddLanguageWindowView::GetPreferredSize() { 272 gfx::Size AddLanguageWindowView::GetPreferredSize() {
273 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 273 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
274 ChromeFont font = rb.GetFont(ResourceBundle::BaseFont); 274 gfx::Font font = rb.GetFont(ResourceBundle::BaseFont);
275 return gfx::Size(font.ave_char_width() * kDefaultWindowWidthChars, 275 return gfx::Size(font.ave_char_width() * kDefaultWindowWidthChars,
276 font.height() * kDefaultWindowHeightLines); 276 font.height() * kDefaultWindowHeightLines);
277 } 277 }
278 278
279 void AddLanguageWindowView::ViewHierarchyChanged(bool is_add, 279 void AddLanguageWindowView::ViewHierarchyChanged(bool is_add,
280 views::View* parent, 280 views::View* parent,
281 views::View* child) { 281 views::View* child) {
282 // Can't init before we're inserted into a Widget, because we require 282 // Can't init before we're inserted into a Widget, because we require
283 // a HWND to parent native child controls to. 283 // a HWND to parent native child controls to.
284 if (is_add && child == this) 284 if (is_add && child == this)
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 if (spellcheck_language_index_selected_ != -1) { 839 if (spellcheck_language_index_selected_ != -1) {
840 UserMetricsRecordAction(L"Options_DictionaryLanguage", 840 UserMetricsRecordAction(L"Options_DictionaryLanguage",
841 profile()->GetPrefs()); 841 profile()->GetPrefs());
842 dictionary_language_.SetValue(ASCIIToWide(dictionary_language_model_-> 842 dictionary_language_.SetValue(ASCIIToWide(dictionary_language_model_->
843 GetLocaleFromIndex(spellcheck_language_index_selected_))); 843 GetLocaleFromIndex(spellcheck_language_index_selected_)));
844 } 844 }
845 845
846 if (enable_spellcheck_checkbox_clicked_) 846 if (enable_spellcheck_checkbox_clicked_)
847 enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked()); 847 enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked());
848 } 848 }
OLDNEW
« no previous file with comments | « chrome/browser/views/options/fonts_page_view.cc ('k') | chrome/browser/views/options/options_group_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698