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

Side by Side Diff: chrome/browser/chromeos/options/language_chewing_config_view.cc

Issue 2755003: Fix chewing layout (Closed)
Patch Set: Code Review Created 10 years, 6 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
« no previous file with comments | « no previous file | 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) 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 "chrome/browser/chromeos/options/language_chewing_config_view.h" 5 #include "chrome/browser/chromeos/options/language_chewing_config_view.h"
6 6
7 #include "app/combobox_model.h" 7 #include "app/combobox_model.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 GridLayout* layout = new GridLayout(contents_); 123 GridLayout* layout = new GridLayout(contents_);
124 layout->SetInsets(kPanelVertMargin, kPanelHorizMargin, 124 layout->SetInsets(kPanelVertMargin, kPanelHorizMargin,
125 kPanelVertMargin, kPanelHorizMargin); 125 kPanelVertMargin, kPanelHorizMargin);
126 contents_->SetLayoutManager(layout); 126 contents_->SetLayoutManager(layout);
127 127
128 const int kColumnSetId = 0; 128 const int kColumnSetId = 0;
129 ColumnSet* column_set = layout->AddColumnSet(kColumnSetId); 129 ColumnSet* column_set = layout->AddColumnSet(kColumnSetId);
130 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, 130 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
131 GridLayout::USE_PREF, 0, 0); 131 GridLayout::USE_PREF, 0, 0);
132 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); 132 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
133 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 0, 133 column_set->AddColumn(GridLayout::FILL, GridLayout::LEADING, 1,
134 GridLayout::USE_PREF, 0, 0); 134 GridLayout::USE_PREF, 0, 0);
135 135
136 for (size_t i = 0; i < kNumChewingBooleanPrefs; ++i) { 136 for (size_t i = 0; i < kNumChewingBooleanPrefs; ++i) {
137 chewing_boolean_checkboxes_[i] = new views::Checkbox( 137 chewing_boolean_checkboxes_[i] = new views::Checkbox(
138 l10n_util::GetString(kChewingBooleanPrefs[i].message_id)); 138 l10n_util::GetString(kChewingBooleanPrefs[i].message_id));
139 chewing_boolean_checkboxes_[i]->set_listener(this); 139 chewing_boolean_checkboxes_[i]->set_listener(this);
140 chewing_boolean_checkboxes_[i]->set_tag(i); 140 chewing_boolean_checkboxes_[i]->set_tag(i);
141 } 141 }
142 for (size_t i = 0; i < kNumChewingMultipleChoicePrefs; ++i) { 142 for (size_t i = 0; i < kNumChewingMultipleChoicePrefs; ++i) {
143 ChewingPrefAndAssociatedCombobox& current = prefs_and_comboboxes_[i]; 143 ChewingPrefAndAssociatedCombobox& current = prefs_and_comboboxes_[i];
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 const int value = hsu_sel_key_type_.multiple_choice_pref.GetValue(); 214 const int value = hsu_sel_key_type_.multiple_choice_pref.GetValue();
215 for (int i = 0; i < hsu_sel_key_type_.combobox_model->num_items(); ++i) { 215 for (int i = 0; i < hsu_sel_key_type_.combobox_model->num_items(); ++i) {
216 if (hsu_sel_key_type_.combobox_model->GetConfigValueAt(i) == value) { 216 if (hsu_sel_key_type_.combobox_model->GetConfigValueAt(i) == value) {
217 hsu_sel_key_type_.combobox->SetSelectedItem(i); 217 hsu_sel_key_type_.combobox->SetSelectedItem(i);
218 break; 218 break;
219 } 219 }
220 } 220 }
221 } 221 }
222 222
223 } // namespace chromeos 223 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698