diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 09:42:07 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 09:42:07 +0000 |
commit | 79d2ac17ac3aab3f5a977af043d8533ae098ed77 (patch) | |
tree | 408d61a2e66a2815aab83f7e55254d23bd3f06e0 /chrome/browser/chromeos | |
parent | 47d15820bc3c6fd14725c32d776036ab1ce131ee (diff) | |
download | chromium_src-79d2ac17ac3aab3f5a977af043d8533ae098ed77.zip chromium_src-79d2ac17ac3aab3f5a977af043d8533ae098ed77.tar.gz chromium_src-79d2ac17ac3aab3f5a977af043d8533ae098ed77.tar.bz2 |
Fix a bug that caused buttons in "Languages and Input" dialog to be truncated.
Change the layout so the input method configure button will be shown right
next to the input method name (the layout was bad as the row was sharing the
same columnset with the huge the "Display Google Chrome in this language"
button).
Also widen the width of the dialog from 96 to 106, so the "Display Google
Chrome in this language" button does not get truncated. To do this, define
separate dialog size settings for this dialog.
BUG=chromium-os:3235
TEST=manually
Review URL: http://codereview.chromium.org/2106008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47404 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/options/language_config_view.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/chromeos/options/language_config_view.cc b/chrome/browser/chromeos/options/language_config_view.cc index d64fa1e..9872186 100644 --- a/chrome/browser/chromeos/options/language_config_view.cc +++ b/chrome/browser/chromeos/options/language_config_view.cc @@ -63,6 +63,7 @@ enum ButtonTag { // The column set IDs are used for creating the per-language config view. const int kPerLanguageTitleColumnSetId = 1; const int kPerLanguageDoubleColumnSetId = 2; +const int kPerLanguageSingleColumnSetId = 3; } // namespace @@ -119,11 +120,9 @@ class AddLanguageView : public views::View, // views::View overrides: gfx::Size GetPreferredSize() { - // TODO(satorux): Create our own localized content size once the UI is - // done. return gfx::Size(views::Window::GetLocalizedContentsSize( - IDS_FONTSLANG_DIALOG_WIDTH_CHARS, - IDS_FONTSLANG_DIALOG_HEIGHT_LINES)); + IDS_LANGUAGES_INPUT_DIALOG_WIDTH_CHARS, + IDS_LANGUAGES_INPUT_DIALOG_HEIGHT_LINES)); } virtual void Layout() { @@ -318,10 +317,9 @@ std::wstring LanguageConfigView::GetWindowTitle() const { } gfx::Size LanguageConfigView::GetPreferredSize() { - // TODO(satorux): Create our own localized content size once the UI is done. return gfx::Size(views::Window::GetLocalizedContentsSize( - IDS_FONTSLANG_DIALOG_WIDTH_CHARS, - IDS_FONTSLANG_DIALOG_HEIGHT_LINES)); + IDS_LANGUAGES_INPUT_DIALOG_WIDTH_CHARS, + IDS_LANGUAGES_INPUT_DIALOG_HEIGHT_LINES)); } views::View* LanguageConfigView::CreatePerLanguageConfigView( @@ -343,6 +341,11 @@ views::View* LanguageConfigView::CreatePerLanguageConfigView( column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, GridLayout::USE_PREF, 0, 0); + column_set = layout->AddColumnSet(kPerLanguageSingleColumnSetId); + column_set->AddPaddingColumn(0, kUnrelatedControlHorizontalSpacing); + column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, + GridLayout::USE_PREF, 0, 0); + AddUiLanguageSection(target_language_code, layout); layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing); AddInputMethodSection(target_language_code, layout); @@ -368,7 +371,7 @@ void LanguageConfigView::AddUiLanguageSection(const std::string& language_code, layout->AddView(language_name_label); layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); - layout->StartRow(0, kPerLanguageDoubleColumnSetId); + layout->StartRow(0, kPerLanguageSingleColumnSetId); if (application_locale == language_code) { layout->AddView( new views::Label( |