| OLD | NEW |
| 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 #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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 void AddLanguageWindowView::Layout() { | 133 void AddLanguageWindowView::Layout() { |
| 134 gfx::Size sz = accept_language_combobox_->GetPreferredSize(); | 134 gfx::Size sz = accept_language_combobox_->GetPreferredSize(); |
| 135 accept_language_combobox_->SetBounds(kDialogPadding, kDialogPadding, | 135 accept_language_combobox_->SetBounds(kDialogPadding, kDialogPadding, |
| 136 width() - 2*kDialogPadding, | 136 width() - 2*kDialogPadding, |
| 137 sz.height()); | 137 sz.height()); |
| 138 } | 138 } |
| 139 | 139 |
| 140 gfx::Size AddLanguageWindowView::GetPreferredSize() { | 140 gfx::Size AddLanguageWindowView::GetPreferredSize() { |
| 141 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 141 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 142 gfx::Font font = rb.GetFont(ResourceBundle::BaseFont); | 142 const gfx::Font& font = rb.GetFont(ResourceBundle::BaseFont); |
| 143 return gfx::Size(font.ave_char_width() * kDefaultWindowWidthChars, | 143 return gfx::Size(font.ave_char_width() * kDefaultWindowWidthChars, |
| 144 font.height() * kDefaultWindowHeightLines); | 144 font.height() * kDefaultWindowHeightLines); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void AddLanguageWindowView::ViewHierarchyChanged(bool is_add, | 147 void AddLanguageWindowView::ViewHierarchyChanged(bool is_add, |
| 148 views::View* parent, | 148 views::View* parent, |
| 149 views::View* child) { | 149 views::View* child) { |
| 150 // Can't init before we're inserted into a Widget, because we require | 150 // Can't init before we're inserted into a Widget, because we require |
| 151 // a HWND to parent native child controls to. | 151 // a HWND to parent native child controls to. |
| 152 if (is_add && child == this) | 152 if (is_add && child == this) |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 } | 569 } |
| 570 | 570 |
| 571 if (enable_spellcheck_checkbox_clicked_) | 571 if (enable_spellcheck_checkbox_clicked_) |
| 572 enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked()); | 572 enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked()); |
| 573 | 573 |
| 574 if (enable_autospellcorrect_checkbox_clicked_) { | 574 if (enable_autospellcorrect_checkbox_clicked_) { |
| 575 enable_autospellcorrect_.SetValue( | 575 enable_autospellcorrect_.SetValue( |
| 576 enable_autospellcorrect_checkbox_->checked()); | 576 enable_autospellcorrect_checkbox_->checked()); |
| 577 } | 577 } |
| 578 } | 578 } |
| OLD | NEW |