| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <shlobj.h> | 6 #include <shlobj.h> |
| 7 #include <vsstyle.h> | 7 #include <vsstyle.h> |
| 8 #include <vssym32.h> | 8 #include <vssym32.h> |
| 9 | 9 |
| 10 #include "chrome/browser/views/options/languages_page_view.h" | 10 #include "chrome/browser/views/options/languages_page_view.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 void AddLanguageWindowView::Layout() { | 135 void AddLanguageWindowView::Layout() { |
| 136 gfx::Size sz = accept_language_combobox_->GetPreferredSize(); | 136 gfx::Size sz = accept_language_combobox_->GetPreferredSize(); |
| 137 accept_language_combobox_->SetBounds(kDialogPadding, kDialogPadding, | 137 accept_language_combobox_->SetBounds(kDialogPadding, kDialogPadding, |
| 138 width() - 2*kDialogPadding, | 138 width() - 2*kDialogPadding, |
| 139 sz.height()); | 139 sz.height()); |
| 140 } | 140 } |
| 141 | 141 |
| 142 gfx::Size AddLanguageWindowView::GetPreferredSize() { | 142 gfx::Size AddLanguageWindowView::GetPreferredSize() { |
| 143 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 143 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 144 const gfx::Font& font = rb.GetFont(ResourceBundle::BaseFont); | 144 const gfx::Font& font = rb.GetFont(ResourceBundle::BaseFont); |
| 145 return gfx::Size(font.ave_char_width() * kDefaultWindowWidthChars, | 145 return gfx::Size(font.GetAverageCharacterWidth() * kDefaultWindowWidthChars, |
| 146 font.height() * kDefaultWindowHeightLines); | 146 font.GetHeight() * kDefaultWindowHeightLines); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void AddLanguageWindowView::ViewHierarchyChanged(bool is_add, | 149 void AddLanguageWindowView::ViewHierarchyChanged(bool is_add, |
| 150 views::View* parent, | 150 views::View* parent, |
| 151 views::View* child) { | 151 views::View* child) { |
| 152 // Can't init before we're inserted into a Widget, because we require | 152 // Can't init before we're inserted into a Widget, because we require |
| 153 // a HWND to parent native child controls to. | 153 // a HWND to parent native child controls to. |
| 154 if (is_add && child == this) | 154 if (is_add && child == this) |
| 155 Init(); | 155 Init(); |
| 156 } | 156 } |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 } | 570 } |
| 571 | 571 |
| 572 if (enable_spellcheck_checkbox_clicked_) | 572 if (enable_spellcheck_checkbox_clicked_) |
| 573 enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked()); | 573 enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked()); |
| 574 | 574 |
| 575 if (enable_autospellcorrect_checkbox_clicked_) { | 575 if (enable_autospellcorrect_checkbox_clicked_) { |
| 576 enable_autospellcorrect_.SetValue( | 576 enable_autospellcorrect_.SetValue( |
| 577 enable_autospellcorrect_checkbox_->checked()); | 577 enable_autospellcorrect_checkbox_->checked()); |
| 578 } | 578 } |
| 579 } | 579 } |
| OLD | NEW |