summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/resources/locale_settings.grd12
-rw-r--r--chrome/app/resources/locale_settings_am.xtb2
-rw-r--r--chrome/app/resources/locale_settings_ar.xtb2
-rw-r--r--chrome/app/resources/locale_settings_bg.xtb2
-rw-r--r--chrome/app/resources/locale_settings_bn.xtb2
-rw-r--r--chrome/app/resources/locale_settings_ca.xtb2
-rw-r--r--chrome/app/resources/locale_settings_cs.xtb2
-rw-r--r--chrome/app/resources/locale_settings_da.xtb7
-rw-r--r--chrome/app/resources/locale_settings_de.xtb2
-rw-r--r--chrome/app/resources/locale_settings_el.xtb2
-rw-r--r--chrome/app/resources/locale_settings_en-GB.xtb2
-rw-r--r--chrome/app/resources/locale_settings_es-419.xtb2
-rw-r--r--chrome/app/resources/locale_settings_es.xtb2
-rw-r--r--chrome/app/resources/locale_settings_et.xtb2
-rw-r--r--chrome/app/resources/locale_settings_fi.xtb2
-rw-r--r--chrome/app/resources/locale_settings_fil.xtb2
-rw-r--r--chrome/app/resources/locale_settings_fr.xtb2
-rw-r--r--chrome/app/resources/locale_settings_gu.xtb2
-rw-r--r--chrome/app/resources/locale_settings_he.xtb2
-rw-r--r--chrome/app/resources/locale_settings_hi.xtb2
-rw-r--r--chrome/app/resources/locale_settings_hr.xtb2
-rw-r--r--chrome/app/resources/locale_settings_hu.xtb2
-rw-r--r--chrome/app/resources/locale_settings_id.xtb2
-rw-r--r--chrome/app/resources/locale_settings_it.xtb7
-rw-r--r--chrome/app/resources/locale_settings_ja.xtb2
-rw-r--r--chrome/app/resources/locale_settings_kn.xtb2
-rw-r--r--chrome/app/resources/locale_settings_ko.xtb2
-rw-r--r--chrome/app/resources/locale_settings_lt.xtb2
-rw-r--r--chrome/app/resources/locale_settings_lv.xtb2
-rw-r--r--chrome/app/resources/locale_settings_ml.xtb2
-rw-r--r--chrome/app/resources/locale_settings_mr.xtb2
-rw-r--r--chrome/app/resources/locale_settings_nb.xtb2
-rw-r--r--chrome/app/resources/locale_settings_nl.xtb2
-rw-r--r--chrome/app/resources/locale_settings_or.xtb2
-rw-r--r--chrome/app/resources/locale_settings_pl.xtb2
-rw-r--r--chrome/app/resources/locale_settings_pt-BR.xtb2
-rw-r--r--chrome/app/resources/locale_settings_pt-PT.xtb2
-rw-r--r--chrome/app/resources/locale_settings_ro.xtb2
-rw-r--r--chrome/app/resources/locale_settings_ru.xtb2
-rw-r--r--chrome/app/resources/locale_settings_sk.xtb2
-rw-r--r--chrome/app/resources/locale_settings_sl.xtb2
-rw-r--r--chrome/app/resources/locale_settings_sr.xtb2
-rw-r--r--chrome/app/resources/locale_settings_sv.xtb2
-rw-r--r--chrome/app/resources/locale_settings_sw.xtb2
-rw-r--r--chrome/app/resources/locale_settings_ta.xtb2
-rw-r--r--chrome/app/resources/locale_settings_te.xtb2
-rw-r--r--chrome/app/resources/locale_settings_th.xtb2
-rw-r--r--chrome/app/resources/locale_settings_tr.xtb2
-rw-r--r--chrome/app/resources/locale_settings_uk.xtb2
-rw-r--r--chrome/app/resources/locale_settings_vi.xtb2
-rw-r--r--chrome/app/resources/locale_settings_zh-CN.xtb2
-rw-r--r--chrome/app/resources/locale_settings_zh-TW.xtb2
-rw-r--r--chrome/browser/chromeos/options/options_window_view.cc73
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc25
-rw-r--r--chrome/browser/views/options/content_page_view.cc32
-rw-r--r--chrome/browser/views/options/general_page_view.cc42
-rw-r--r--chrome/browser/views/options/general_page_view.h3
-rw-r--r--chrome/browser/views/options/options_window_view.cc6
-rw-r--r--chrome/browser/views/tab_contents/tab_contents_view_gtk.cc6
-rw-r--r--chrome/chrome_tests.gypi1
-rw-r--r--views/controls/button/native_button_win.cc17
-rw-r--r--views/controls/button/native_button_win.h10
-rw-r--r--views/controls/menu/menu_scroll_view_container.cc1
-rw-r--r--views/controls/native_control.cc2
-rw-r--r--views/controls/scrollbar/native_scroll_bar_win.cc34
-rw-r--r--views/controls/scrollbar/native_scroll_bar_win.h10
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_gtk.cc23
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_gtk.h3
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_win.cc102
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_win.h7
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_wrapper.h5
-rw-r--r--views/controls/tabbed_pane/tabbed_pane.cc9
-rw-r--r--views/controls/tabbed_pane/tabbed_pane.h2
-rw-r--r--views/controls/tabbed_pane/tabbed_pane_unittest.cc82
-rw-r--r--views/controls/table/table_view.cc14
-rw-r--r--views/controls/table/table_view.h8
-rw-r--r--views/examples/tabbed_pane_example.h3
-rw-r--r--views/grid_layout.cc23
-rw-r--r--views/grid_layout.h3
-rw-r--r--views/grid_layout_unittest.cc60
-rw-r--r--views/view.cc9
-rw-r--r--views/widget/widget_gtk.cc14
-rw-r--r--views/widget/widget_gtk.h1
83 files changed, 298 insertions, 456 deletions
diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd
index 2256e0f..bc8ccf7 100644
--- a/chrome/app/resources/locale_settings.grd
+++ b/chrome/app/resources/locale_settings.grd
@@ -243,6 +243,18 @@
en-US
</message>
+ <!-- The width of the Options dialog box, in characters (character width = -->
+ <!-- average character width for default dialog box font) -->
+ <message name="IDS_OPTIONS_DIALOG_WIDTH_CHARS" use_name_for_id="true">
+ 98
+ </message>
+
+ <!-- The height of the Options dialog box, in lines (line height = character -->
+ <!-- height for default dialog box font) -->
+ <message name="IDS_OPTIONS_DIALOG_HEIGHT_LINES" use_name_for_id="true">
+ 36
+ </message>
+
<!-- The width of the title column of the Options dialog box, in characters (see -->
<!-- above for defn of character width) -->
<message name="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS" use_name_for_id="true">
diff --git a/chrome/app/resources/locale_settings_am.xtb b/chrome/app/resources/locale_settings_am.xtb
index 9dd35eb3..d5720c8 100644
--- a/chrome/app/resources/locale_settings_am.xtb
+++ b/chrome/app/resources/locale_settings_am.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-GB</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">36</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">23</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_ar.xtb b/chrome/app/resources/locale_settings_ar.xtb
index 56d567f..185561c 100644
--- a/chrome/app/resources/locale_settings_ar.xtb
+++ b/chrome/app/resources/locale_settings_ar.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1256</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">105</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_bg.xtb b/chrome/app/resources/locale_settings_bg.xtb
index d66d8c9..312ed32 100644
--- a/chrome/app/resources/locale_settings_bg.xtb
+++ b/chrome/app/resources/locale_settings_bg.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1251</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">bg-BG</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">120</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">24</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_bn.xtb b/chrome/app/resources/locale_settings_bn.xtb
index ae611a3..f6fadf9 100644
--- a/chrome/app/resources/locale_settings_bn.xtb
+++ b/chrome/app/resources/locale_settings_bn.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">33</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_ca.xtb b/chrome/app/resources/locale_settings_ca.xtb
index 4f839e6..7a24dac 100644
--- a/chrome/app/resources/locale_settings_ca.xtb
+++ b/chrome/app/resources/locale_settings_ca.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">ca</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">106</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_cs.xtb b/chrome/app/resources/locale_settings_cs.xtb
index 23fb131..e6c0b2e 100644
--- a/chrome/app/resources/locale_settings_cs.xtb
+++ b/chrome/app/resources/locale_settings_cs.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1250</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">cs</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">102</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">38</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_da.xtb b/chrome/app/resources/locale_settings_da.xtb
index 672c0e6..ae1ccda 100644
--- a/chrome/app/resources/locale_settings_da.xtb
+++ b/chrome/app/resources/locale_settings_da.xtb
@@ -5,6 +5,13 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">da</translation>
+<if expr="pp_if('chromeos')">
+ <translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">118</translation>
+</if>
+<if expr="not pp_if('chromeos')">
+ <translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+</if>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">23</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_de.xtb b/chrome/app/resources/locale_settings_de.xtb
index 68ad69e..8f0fa3b 100644
--- a/chrome/app/resources/locale_settings_de.xtb
+++ b/chrome/app/resources/locale_settings_de.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">de</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">108</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_el.xtb b/chrome/app/resources/locale_settings_el.xtb
index ce3214f..50e7e23 100644
--- a/chrome/app/resources/locale_settings_el.xtb
+++ b/chrome/app/resources/locale_settings_el.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-7</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">el</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">106</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">41</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">20</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_en-GB.xtb b/chrome/app/resources/locale_settings_en-GB.xtb
index a879f7d..074849e 100644
--- a/chrome/app/resources/locale_settings_en-GB.xtb
+++ b/chrome/app/resources/locale_settings_en-GB.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-GB</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">23</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_es-419.xtb b/chrome/app/resources/locale_settings_es-419.xtb
index deeb693..a57d6a1 100644
--- a/chrome/app/resources/locale_settings_es-419.xtb
+++ b/chrome/app/resources/locale_settings_es-419.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">es</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">104</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">24</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_es.xtb b/chrome/app/resources/locale_settings_es.xtb
index bcb3afa..9d89f10 100644
--- a/chrome/app/resources/locale_settings_es.xtb
+++ b/chrome/app/resources/locale_settings_es.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">es</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">104</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">24</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_et.xtb b/chrome/app/resources/locale_settings_et.xtb
index 1a2bed8..c023344 100644
--- a/chrome/app/resources/locale_settings_et.xtb
+++ b/chrome/app/resources/locale_settings_et.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1257</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">et</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">102</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_fi.xtb b/chrome/app/resources/locale_settings_fi.xtb
index 96b5866..fd25c04 100644
--- a/chrome/app/resources/locale_settings_fi.xtb
+++ b/chrome/app/resources/locale_settings_fi.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_fil.xtb b/chrome/app/resources/locale_settings_fil.xtb
index fabcb7d..17f2568 100644
--- a/chrome/app/resources/locale_settings_fil.xtb
+++ b/chrome/app/resources/locale_settings_fil.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">106</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">41</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_fr.xtb b/chrome/app/resources/locale_settings_fr.xtb
index 0d4cc13..ac86bf0 100644
--- a/chrome/app/resources/locale_settings_fr.xtb
+++ b/chrome/app/resources/locale_settings_fr.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">fr</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">112</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">24</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_gu.xtb b/chrome/app/resources/locale_settings_gu.xtb
index 909f704..66b719d 100644
--- a/chrome/app/resources/locale_settings_gu.xtb
+++ b/chrome/app/resources/locale_settings_gu.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">102</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_he.xtb b/chrome/app/resources/locale_settings_he.xtb
index 2ddc8a8..a832f7f 100644
--- a/chrome/app/resources/locale_settings_he.xtb
+++ b/chrome/app/resources/locale_settings_he.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1255</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">true</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">he</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">25</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_hi.xtb b/chrome/app/resources/locale_settings_hi.xtb
index bb26525..79b98a7 100644
--- a/chrome/app/resources/locale_settings_hi.xtb
+++ b/chrome/app/resources/locale_settings_hi.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">hi</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">34</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_hr.xtb b/chrome/app/resources/locale_settings_hr.xtb
index e4c9aa2..c581fd0 100644
--- a/chrome/app/resources/locale_settings_hr.xtb
+++ b/chrome/app/resources/locale_settings_hr.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1250</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">hr</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">102</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">38</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_hu.xtb b/chrome/app/resources/locale_settings_hu.xtb
index 2cf74f8..de89fc7 100644
--- a/chrome/app/resources/locale_settings_hu.xtb
+++ b/chrome/app/resources/locale_settings_hu.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-2</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">hu-HU</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">106</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_id.xtb b/chrome/app/resources/locale_settings_id.xtb
index a384576..4202bda 100644
--- a/chrome/app/resources/locale_settings_id.xtb
+++ b/chrome/app/resources/locale_settings_id.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">id</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_it.xtb b/chrome/app/resources/locale_settings_it.xtb
index 46a86a0..6ec00f6 100644
--- a/chrome/app/resources/locale_settings_it.xtb
+++ b/chrome/app/resources/locale_settings_it.xtb
@@ -5,6 +5,13 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">it</translation>
+<if expr="pp_if('chromeos')">
+ <translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">114</translation>
+</if>
+<if expr="not pp_if('chromeos')">
+ <translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+</if>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_ja.xtb b/chrome/app/resources/locale_settings_ja.xtb
index 8adf02e..1a531e7 100644
--- a/chrome/app/resources/locale_settings_ja.xtb
+++ b/chrome/app/resources/locale_settings_ja.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">Shift_JIS</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">104</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">25</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_kn.xtb b/chrome/app/resources/locale_settings_kn.xtb
index 490c366..f813251 100644
--- a/chrome/app/resources/locale_settings_kn.xtb
+++ b/chrome/app/resources/locale_settings_kn.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">106</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">34</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_ko.xtb b/chrome/app/resources/locale_settings_ko.xtb
index a27126f..33474c8 100644
--- a/chrome/app/resources/locale_settings_ko.xtb
+++ b/chrome/app/resources/locale_settings_ko.xtb
@@ -9,6 +9,8 @@
<translation id="IDS_MINIMUM_LOGICAL_FONT_SIZE">10</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_lt.xtb b/chrome/app/resources/locale_settings_lt.xtb
index b9b3890..532ec55 100644
--- a/chrome/app/resources/locale_settings_lt.xtb
+++ b/chrome/app/resources/locale_settings_lt.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1257</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">lt</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">104</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">38</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_lv.xtb b/chrome/app/resources/locale_settings_lv.xtb
index 4870327..113a216 100644
--- a/chrome/app/resources/locale_settings_lv.xtb
+++ b/chrome/app/resources/locale_settings_lv.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1257</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">lv</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">102</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">38</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_ml.xtb b/chrome/app/resources/locale_settings_ml.xtb
index 4195bd1..96523fd 100644
--- a/chrome/app/resources/locale_settings_ml.xtb
+++ b/chrome/app/resources/locale_settings_ml.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">114</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">36</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">87</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_mr.xtb b/chrome/app/resources/locale_settings_mr.xtb
index 818c06c..fbcac2e 100644
--- a/chrome/app/resources/locale_settings_mr.xtb
+++ b/chrome/app/resources/locale_settings_mr.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">34</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_nb.xtb b/chrome/app/resources/locale_settings_nb.xtb
index 2d3fe94..ef4109c 100644
--- a/chrome/app/resources/locale_settings_nb.xtb
+++ b/chrome/app/resources/locale_settings_nb.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">nb</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">104</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">25</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_nl.xtb b/chrome/app/resources/locale_settings_nl.xtb
index 9cd360f..10f94a1 100644
--- a/chrome/app/resources/locale_settings_nl.xtb
+++ b/chrome/app/resources/locale_settings_nl.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">nl</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">108</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">30</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_or.xtb b/chrome/app/resources/locale_settings_or.xtb
index f615091..9ab3eb6 100644
--- a/chrome/app/resources/locale_settings_or.xtb
+++ b/chrome/app/resources/locale_settings_or.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">34</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_pl.xtb b/chrome/app/resources/locale_settings_pl.xtb
index d130b01..1558d8e 100644
--- a/chrome/app/resources/locale_settings_pl.xtb
+++ b/chrome/app/resources/locale_settings_pl.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-2</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">pl</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">105</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">38</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">25</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_pt-BR.xtb b/chrome/app/resources/locale_settings_pt-BR.xtb
index fa74574..e0d3a64 100644
--- a/chrome/app/resources/locale_settings_pt-BR.xtb
+++ b/chrome/app/resources/locale_settings_pt-BR.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">pt-BR</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">110</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">30</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_pt-PT.xtb b/chrome/app/resources/locale_settings_pt-PT.xtb
index 0f275cb..30da552 100644
--- a/chrome/app/resources/locale_settings_pt-PT.xtb
+++ b/chrome/app/resources/locale_settings_pt-PT.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">pt-PT</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">110</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">30</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_ro.xtb b/chrome/app/resources/locale_settings_ro.xtb
index 1ce3d43..11c1ca4 100644
--- a/chrome/app/resources/locale_settings_ro.xtb
+++ b/chrome/app/resources/locale_settings_ro.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-2</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">ro</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">104</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_ru.xtb b/chrome/app/resources/locale_settings_ru.xtb
index 78c8730..c837201 100644
--- a/chrome/app/resources/locale_settings_ru.xtb
+++ b/chrome/app/resources/locale_settings_ru.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1251</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">ru</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">122</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_sk.xtb b/chrome/app/resources/locale_settings_sk.xtb
index 211ef79..147a656 100644
--- a/chrome/app/resources/locale_settings_sk.xtb
+++ b/chrome/app/resources/locale_settings_sk.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1250</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">sk</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">104</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">38</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_sl.xtb b/chrome/app/resources/locale_settings_sl.xtb
index ec7d084..1329afa 100644
--- a/chrome/app/resources/locale_settings_sl.xtb
+++ b/chrome/app/resources/locale_settings_sl.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-2</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">sl</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_sr.xtb b/chrome/app/resources/locale_settings_sr.xtb
index 3be27ea..04a1b4e 100644
--- a/chrome/app/resources/locale_settings_sr.xtb
+++ b/chrome/app/resources/locale_settings_sr.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1251</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">106</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_sv.xtb b/chrome/app/resources/locale_settings_sv.xtb
index 48c286b..d49037d 100644
--- a/chrome/app/resources/locale_settings_sv.xtb
+++ b/chrome/app/resources/locale_settings_sv.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">sv</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">100</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">25</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_sw.xtb b/chrome/app/resources/locale_settings_sw.xtb
index c323604..a70cdde 100644
--- a/chrome/app/resources/locale_settings_sw.xtb
+++ b/chrome/app/resources/locale_settings_sw.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-GB</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">23</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_ta.xtb b/chrome/app/resources/locale_settings_ta.xtb
index 41c0005..61edcd1 100644
--- a/chrome/app/resources/locale_settings_ta.xtb
+++ b/chrome/app/resources/locale_settings_ta.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">120</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">41</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_te.xtb b/chrome/app/resources/locale_settings_te.xtb
index f39635a..6a53c74 100644
--- a/chrome/app/resources/locale_settings_te.xtb
+++ b/chrome/app/resources/locale_settings_te.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">106</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">32</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_th.xtb b/chrome/app/resources/locale_settings_th.xtb
index a373609..cd538d9 100644
--- a/chrome/app/resources/locale_settings_th.xtb
+++ b/chrome/app/resources/locale_settings_th.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-874</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_tr.xtb b/chrome/app/resources/locale_settings_tr.xtb
index ce582db..8213ddd 100644
--- a/chrome/app/resources/locale_settings_tr.xtb
+++ b/chrome/app/resources/locale_settings_tr.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-9</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">tr</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">100</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_uk.xtb b/chrome/app/resources/locale_settings_uk.xtb
index 7cb7a1d..696323f 100644
--- a/chrome/app/resources/locale_settings_uk.xtb
+++ b/chrome/app/resources/locale_settings_uk.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1251</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">108</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">40</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_vi.xtb b/chrome/app/resources/locale_settings_vi.xtb
index d7f626f..6246dd7 100644
--- a/chrome/app/resources/locale_settings_vi.xtb
+++ b/chrome/app/resources/locale_settings_vi.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">windows-1258</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">vi</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">41</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_zh-CN.xtb b/chrome/app/resources/locale_settings_zh-CN.xtb
index a8efab8..5d2fc0d 100644
--- a/chrome/app/resources/locale_settings_zh-CN.xtb
+++ b/chrome/app/resources/locale_settings_zh-CN.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">GBK</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">98</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">26</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/app/resources/locale_settings_zh-TW.xtb b/chrome/app/resources/locale_settings_zh-TW.xtb
index 3ccbf87..fa8b3ba 100644
--- a/chrome/app/resources/locale_settings_zh-TW.xtb
+++ b/chrome/app/resources/locale_settings_zh-TW.xtb
@@ -5,6 +5,8 @@
<translation id="IDS_DEFAULT_ENCODING">Big5</translation>
<translation id="IDS_USES_UNIVERSAL_DETECTOR">false</translation>
<translation id="IDS_SPELLCHECK_DICTIONARY">en-US</translation>
+<translation id="IDS_OPTIONS_DIALOG_WIDTH_CHARS">95</translation>
+<translation id="IDS_OPTIONS_DIALOG_HEIGHT_LINES">39</translation>
<translation id="IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS">25</translation>
<translation id="IDS_OPTIONS_RESET_CONFIRM_BOX_WIDTH_CHARS">80</translation>
<translation id="IDS_URLPICKER_DIALOG_WIDTH_CHARS">80</translation>
diff --git a/chrome/browser/chromeos/options/options_window_view.cc b/chrome/browser/chromeos/options/options_window_view.cc
index 4535e8b..d284ce3 100644
--- a/chrome/browser/chromeos/options/options_window_view.cc
+++ b/chrome/browser/chromeos/options/options_window_view.cc
@@ -35,48 +35,6 @@
namespace chromeos {
///////////////////////////////////////////////////////////////////////////////
-// GtkPreferencePageHost
-//
-// Hosts a GTK preference page and takes care of sizing it appropriately.
-//
-class GtkPreferencePageHost : public views::NativeViewHost {
- public:
- explicit GtkPreferencePageHost(GtkWidget* widget);
-
- private:
- // views::View overrides:
- virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
- virtual gfx::Size GetPreferredSize();
-
- GtkWidget* widget_;
-
- DISALLOW_COPY_AND_ASSIGN(GtkPreferencePageHost);
-};
-
-GtkPreferencePageHost::GtkPreferencePageHost(GtkWidget* widget)
- : widget_(widget) {
- set_background(views::Background::CreateSolidBackground(SK_ColorWHITE));
-}
-
-void GtkPreferencePageHost::ViewHierarchyChanged(bool is_add,
- View* parent,
- View* child) {
- NativeViewHost::ViewHierarchyChanged(is_add, parent, child);
- if (is_add && child == this)
- Attach(widget_);
-}
-
-gfx::Size GtkPreferencePageHost::GetPreferredSize() {
- // We need to show the widget and its children since otherwise containers like
- // gtk_box don't compute the correct size.
- gtk_widget_show_all(widget_);
- GtkRequisition requisition = { 0, 0 };
- gtk_widget_size_request(GTK_WIDGET(widget_), &requisition);
- GtkRequisition& size(widget_->requisition);
- return gfx::Size(size.width, size.height);
-}
-
-///////////////////////////////////////////////////////////////////////////////
// OptionsWindowView
//
// The contents of the Options dialog window.
@@ -256,9 +214,9 @@ void OptionsWindowView::Layout() {
}
gfx::Size OptionsWindowView::GetPreferredSize() {
- gfx::Size size(tabs_->GetPreferredSize());
- size.Enlarge(2 * kDialogPadding, 2 * kDialogPadding);
- return size;
+ return gfx::Size(views::Window::GetLocalizedContentsSize(
+ IDS_OPTIONS_DIALOG_WIDTH_CHARS,
+ IDS_OPTIONS_DIALOG_HEIGHT_LINES));
}
void OptionsWindowView::ViewHierarchyChanged(bool is_add,
@@ -305,23 +263,29 @@ void OptionsWindowView::Init() {
l10n_util::GetString(IDS_OPTIONS_INTERNET_TAB_LABEL),
internet_page, false);
+ views::NativeViewHost* general_page_view = new views::NativeViewHost();
+ general_page_view->set_background(views::Background::CreateSolidBackground(
+ SK_ColorWHITE));
tabs_->AddTabAtIndex(tab_index++,
l10n_util::GetString(IDS_OPTIONS_GENERAL_TAB_LABEL),
- new GtkPreferencePageHost(
- general_page_.get_page_widget()),
- false);
+ general_page_view, false);
+ general_page_view->Attach(general_page_.get_page_widget());
+ views::NativeViewHost* content_page_view = new views::NativeViewHost();
+ content_page_view->set_background(views::Background::CreateSolidBackground(
+ SK_ColorWHITE));
tabs_->AddTabAtIndex(tab_index++,
l10n_util::GetString(IDS_OPTIONS_CONTENT_TAB_LABEL),
- new GtkPreferencePageHost(
- content_page_.get_page_widget()),
- false);
+ content_page_view, false);
+ content_page_view->Attach(content_page_.get_page_widget());
+ views::NativeViewHost* advanced_page_view = new views::NativeViewHost();
+ advanced_page_view->set_background(views::Background::CreateSolidBackground(
+ SK_ColorWHITE));
tabs_->AddTabAtIndex(tab_index++,
l10n_util::GetString(IDS_OPTIONS_ADVANCED_TAB_LABEL),
- new GtkPreferencePageHost(
- advanced_page_.get_page_widget()),
- false);
+ advanced_page_view, false);
+ advanced_page_view->Attach(advanced_page_.get_page_widget());
DCHECK(tabs_->GetTabCount() == OPTIONS_PAGE_COUNT);
@@ -380,3 +344,4 @@ void ShowOptionsWindow(OptionsPage page,
OptionsWindowView::instance_->ShowOptionsPage(page, highlight_group);
}
+
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index bbe232f..9ee6485e 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -287,6 +287,7 @@ AdvancedSection::AdvancedSection(Profile* profile,
void AdvancedSection::DidChangeBounds(const gfx::Rect& previous,
const gfx::Rect& current) {
Layout();
+ contents_->Layout();
}
////////////////////////////////////////////////////////////////////////////////
@@ -433,6 +434,9 @@ class PrivacySection : public AdvancedSection,
// Overridden from views::LinkController:
virtual void LinkActivated(views::Link* source, int event_flags);
+ // Overridden from views::View:
+ virtual void Layout();
+
protected:
// OptionsPageView overrides:
virtual void InitControlLayout();
@@ -545,6 +549,22 @@ void PrivacySection::LinkActivated(views::Link* source, int event_flags) {
}
}
+void PrivacySection::Layout() {
+ if (reporting_enabled_checkbox_) {
+ // We override this to try and set the width of the enable logging checkbox
+ // to the width of the parent less some fudging since the checkbox's
+ // preferred size calculation code is dependent on its width, and if we
+ // don't do this then it will return 0 as a preferred width when GridLayout
+ // (called from View::Layout) tries to access it.
+ views::View* parent = GetParent();
+ if (parent && parent->width()) {
+ const int parent_width = parent->width();
+ reporting_enabled_checkbox_->SetBounds(0, 0, parent_width - 20, 0);
+ }
+ }
+ View::Layout();
+}
+
void PrivacySection::InitControlLayout() {
AdvancedSection::InitControlLayout();
@@ -616,8 +636,8 @@ void PrivacySection::InitControlLayout() {
reporting_enabled_checkbox_ != NULL);
// The "Help make Google Chrome better" checkbox.
if (reporting_enabled_checkbox_) {
- AddWrappingCheckboxRow(layout, reporting_enabled_checkbox_,
- indented_view_set_id, false);
+ AddLeadingControl(layout, reporting_enabled_checkbox_, indented_view_set_id,
+ false);
}
// Init member prefs so we can update the controls if prefs change.
@@ -1401,4 +1421,5 @@ void AdvancedScrollViewContainer::Layout() {
gfx::NativeTheme::LIST);
lb.Inset(border.width(), border.height());
scroll_view_->SetBounds(lb);
+ scroll_view_->Layout();
}
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index 04ccf65..add146e 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -41,10 +41,8 @@
namespace {
-// All the options pages are in the same view hierarchy. This means we need to
-// make sure group identifiers don't collide across different pages.
-const int kPasswordSavingRadioGroup = 201;
-const int kFormAutofillRadioGroup = 202;
+const int kPasswordSavingRadioGroup = 1;
+const int kFormAutofillRadioGroup = 2;
// Background color for the status label when it's showing an error.
static const SkColor kSyncLabelErrorBgColor = SkColorSetRGB(0xff, 0x9a, 0x9a);
@@ -254,6 +252,17 @@ void ContentPageView::NotifyPrefChanged(const std::wstring* pref_name) {
void ContentPageView::Layout() {
if (is_initialized())
UpdateSyncControls();
+ // We need to Layout twice - once to get the width of the contents box...
+ View::Layout();
+ passwords_asktosave_radio_->SetBounds(
+ 0, 0, passwords_group_->GetContentsWidth(), 0);
+ passwords_neversave_radio_->SetBounds(
+ 0, 0, passwords_group_->GetContentsWidth(), 0);
+ if (is_initialized()) {
+ sync_status_label_->SetBounds(
+ 0, 0, sync_group_->GetContentsWidth(), 0);
+ }
+ // ... and twice to get the height of multi-line items correct.
View::Layout();
}
@@ -299,12 +308,10 @@ void ContentPageView::InitPasswordSavingGroup() {
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, single_column_view_set_id);
- layout->AddView(passwords_asktosave_radio_, 1, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(passwords_asktosave_radio_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, single_column_view_set_id);
- layout->AddView(passwords_neversave_radio_, 1, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(passwords_neversave_radio_);
layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(show_passwords_button_);
@@ -349,12 +356,10 @@ void ContentPageView::InitFormAutofillGroup() {
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, fill_column_view_set_id);
- layout->AddView(form_autofill_enable_radio_, 1, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(form_autofill_enable_radio_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, fill_column_view_set_id);
- layout->AddView(form_autofill_disable_radio_, 1, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(form_autofill_disable_radio_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, leading_column_view_set_id);
layout->AddView(change_autofill_settings_button_);
@@ -452,8 +457,7 @@ void ContentPageView::InitSyncGroup() {
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, single_column_view_set_id);
- layout->AddView(sync_status_label_, 3, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(sync_status_label_, 3, 1);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(sync_action_link_, 3, 1);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index f836ea4..20504c9 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -35,13 +35,10 @@
namespace {
-// All the options pages are in the same view hierarchy. This means we need to
-// make sure group identifiers don't collide across different pages.
-const int kStartupRadioGroup = 101;
-const int kHomePageRadioGroup = 102;
+const int kStartupRadioGroup = 1;
+const int kHomePageRadioGroup = 2;
const SkColor kDefaultBrowserLabelColor = SkColorSetRGB(0, 135, 0);
const SkColor kNotDefaultBrowserLabelColor = SkColorSetRGB(135, 0, 0);
-const int kHomePageTextfieldWidthChars = 40;
} // namespace
@@ -405,6 +402,24 @@ void GeneralPageView::HighlightGroup(OptionsGroup highlight_group) {
}
///////////////////////////////////////////////////////////////////////////////
+// GeneralPageView, views::View overrides:
+
+void GeneralPageView::Layout() {
+ // We need to Layout twice - once to get the width of the contents box...
+ View::Layout();
+ startup_last_session_radio_->SetBounds(
+ 0, 0, startup_group_->GetContentsWidth(), 0);
+ homepage_use_newtab_radio_->SetBounds(
+ 0, 0, homepage_group_->GetContentsWidth(), 0);
+ homepage_show_home_button_checkbox_->SetBounds(
+ 0, 0, homepage_group_->GetContentsWidth(), 0);
+ default_browser_status_label_->SetBounds(
+ 0, 0, default_browser_group_->GetContentsWidth(), 0);
+ // ... and twice to get the height of multi-line items correct.
+ View::Layout();
+}
+
+///////////////////////////////////////////////////////////////////////////////
// GeneralPageView, private:
void GeneralPageView::SetDefaultBrowserUIState(
@@ -497,16 +512,14 @@ void GeneralPageView::InitStartupGroup() {
layout->AddView(startup_homepage_radio_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, single_column_view_set_id);
- layout->AddView(startup_last_session_radio_, 1, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(startup_last_session_radio_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(startup_custom_radio_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, double_column_view_set_id);
- layout->AddView(startup_custom_pages_table_, 1, 1,
- GridLayout::FILL, GridLayout::FILL);
+ layout->AddView(startup_custom_pages_table_);
views::View* button_stack = new views::View;
GridLayout* button_stack_layout = new GridLayout(button_stack);
@@ -545,8 +558,6 @@ void GeneralPageView::InitHomepageGroup() {
homepage_use_url_radio_->set_listener(this);
homepage_use_url_textfield_ = new views::Textfield;
homepage_use_url_textfield_->SetController(this);
- homepage_use_url_textfield_->set_default_width_in_chars(
- kHomePageTextfieldWidthChars);
homepage_show_home_button_checkbox_ = new views::Checkbox(
l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_SHOW_BUTTON));
homepage_show_home_button_checkbox_->set_listener(this);
@@ -573,16 +584,14 @@ void GeneralPageView::InitHomepageGroup() {
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, single_column_view_set_id);
- layout->AddView(homepage_use_newtab_radio_, 1, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(homepage_use_newtab_radio_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, double_column_view_set_id);
layout->AddView(homepage_use_url_radio_);
layout->AddView(homepage_use_url_textfield_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, single_column_view_set_id);
- layout->AddView(homepage_show_home_button_checkbox_, 1, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(homepage_show_home_button_checkbox_);
homepage_group_ = new OptionsGroupView(
contents, l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_GROUP_NAME),
@@ -648,8 +657,7 @@ void GeneralPageView::InitDefaultBrowserGroup() {
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, single_column_view_set_id);
- layout->AddView(default_browser_status_label_, 1, 1,
- GridLayout::FILL, GridLayout::LEADING);
+ layout->AddView(default_browser_status_label_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(default_browser_use_as_default_button_);
diff --git a/chrome/browser/views/options/general_page_view.h b/chrome/browser/views/options/general_page_view.h
index 6cc4911..7838fbe 100644
--- a/chrome/browser/views/options/general_page_view.h
+++ b/chrome/browser/views/options/general_page_view.h
@@ -62,6 +62,9 @@ class GeneralPageView : public OptionsPageView,
virtual void NotifyPrefChanged(const std::wstring* pref_name);
virtual void HighlightGroup(OptionsGroup highlight_group);
+ // views::View overrides:
+ virtual void Layout();
+
private:
// ShellIntegration::DefaultBrowserObserver implementation:
// Updates the UI state to reflect the current default browser state.
diff --git a/chrome/browser/views/options/options_window_view.cc b/chrome/browser/views/options/options_window_view.cc
index 70a043d..76c219b 100644
--- a/chrome/browser/views/options/options_window_view.cc
+++ b/chrome/browser/views/options/options_window_view.cc
@@ -183,9 +183,9 @@ void OptionsWindowView::Layout() {
}
gfx::Size OptionsWindowView::GetPreferredSize() {
- gfx::Size size(tabs_->GetPreferredSize());
- size.Enlarge(2 * kDialogPadding, 2 * kDialogPadding);
- return size;
+ return gfx::Size(views::Window::GetLocalizedContentsSize(
+ IDS_OPTIONS_DIALOG_WIDTH_CHARS,
+ IDS_OPTIONS_DIALOG_HEIGHT_LINES));
}
void OptionsWindowView::ViewHierarchyChanged(bool is_add,
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
index b7915b1..b3e8194d 100644
--- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
@@ -217,10 +217,8 @@ void TabContentsViewGtk::GetContainerBounds(gfx::Rect* out) const {
// Callers expect the requested bounds not the actual bounds. For example,
// during init callers expect 0x0, but Gtk layout enforces a min size of 1x1.
- GtkRequisition requisition;
- gtk_widget_get_child_requisition(GetNativeView(), &requisition);
- out->set_width(requisition.width);
- out->set_height(requisition.height);
+ out->set_width(GetNativeView()->requisition.width);
+ out->set_height(GetNativeView()->requisition.height);
}
void TabContentsViewGtk::StartDragging(const WebDropData& drop_data,
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 31d4e54..ea2e142 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -23,7 +23,6 @@
'../views/focus/focus_manager_unittest.cc',
'../views/controls/label_unittest.cc',
'../views/controls/progress_bar_unittest.cc',
- '../views/controls/tabbed_pane/tabbed_pane_unittest.cc',
'../views/controls/table/table_view_unittest.cc',
'../views/grid_layout_unittest.cc',
],
diff --git a/views/controls/button/native_button_win.cc b/views/controls/button/native_button_win.cc
index 9e24fc3..c485c71 100644
--- a/views/controls/button/native_button_win.cc
+++ b/views/controls/button/native_button_win.cc
@@ -19,8 +19,7 @@ namespace views {
// NativeButtonWin, public:
NativeButtonWin::NativeButtonWin(NativeButton* native_button)
- : native_button_(native_button),
- button_size_valid_(false) {
+ : native_button_(native_button) {
// Associates the actual HWND with the native_button so the native_button is
// the one considered as having the focus (not the wrapper) when the HWND is
// focused directly (with a click for example).
@@ -44,14 +43,12 @@ void NativeButtonWin::UpdateLabel() {
}
SetWindowText(native_view(), native_button_->label().c_str());
- button_size_valid_ = false;
}
void NativeButtonWin::UpdateFont() {
SendMessage(native_view(), WM_SETFONT,
reinterpret_cast<WPARAM>(native_button_->font().hfont()),
FALSE);
- button_size_valid_ = false;
}
void NativeButtonWin::UpdateEnabled() {
@@ -63,7 +60,6 @@ void NativeButtonWin::UpdateDefault() {
SendMessage(native_view(), BM_SETSTYLE,
native_button_->is_default() ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON,
true);
- button_size_valid_ = false;
}
}
@@ -92,13 +88,10 @@ gfx::NativeView NativeButtonWin::GetTestingHandle() const {
// NativeButtonWin, View overrides:
gfx::Size NativeButtonWin::GetPreferredSize() {
- if (!button_size_valid_) {
- SIZE sz = {0};
- Button_GetIdealSize(native_view(), reinterpret_cast<LPARAM>(&sz));
- button_size_.SetSize(sz.cx, sz.cy);
- button_size_valid_ = true;
- }
- return button_size_;
+ SIZE sz = {0};
+ SendMessage(native_view(), BCM_GETIDEALSIZE, 0, reinterpret_cast<LPARAM>(&sz));
+
+ return gfx::Size(sz.cx, sz.cy);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/views/controls/button/native_button_win.h b/views/controls/button/native_button_win.h
index 95b8a5ac..20ce575 100644
--- a/views/controls/button/native_button_win.h
+++ b/views/controls/button/native_button_win.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in the
+// LICENSE file.
#ifndef VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_
#define VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_
@@ -49,10 +49,6 @@ class NativeButtonWin : public NativeControlWin,
// The NativeButton we are bound to.
NativeButton* native_button_;
- // It's expensive to find the size of a button on windows, so we cache it.
- mutable gfx::Size button_size_;
- mutable bool button_size_valid_;
-
DISALLOW_COPY_AND_ASSIGN(NativeButtonWin);
};
diff --git a/views/controls/menu/menu_scroll_view_container.cc b/views/controls/menu/menu_scroll_view_container.cc
index 532366c..cb92284 100644
--- a/views/controls/menu/menu_scroll_view_container.cc
+++ b/views/controls/menu/menu_scroll_view_container.cc
@@ -257,7 +257,6 @@ void MenuScrollViewContainer::DidChangeBounds(const gfx::Rect& previous,
gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize();
scroll_up_button_->SetVisible(content_pref.height() > height());
scroll_down_button_->SetVisible(content_pref.height() > height());
- Layout();
}
gfx::Size MenuScrollViewContainer::GetPreferredSize() {
diff --git a/views/controls/native_control.cc b/views/controls/native_control.cc
index 0792b29..f714382 100644
--- a/views/controls/native_control.cc
+++ b/views/controls/native_control.cc
@@ -201,7 +201,7 @@ void NativeControl::ValidateNativeControl() {
void NativeControl::ViewHierarchyChanged(bool is_add, View *parent,
View *child) {
- if (is_add && parent != this && !container_ && GetWidget()) {
+ if (is_add && child == this && GetWidget()) {
ValidateNativeControl();
Layout();
}
diff --git a/views/controls/scrollbar/native_scroll_bar_win.cc b/views/controls/scrollbar/native_scroll_bar_win.cc
index b289823..b3018e3 100644
--- a/views/controls/scrollbar/native_scroll_bar_win.cc
+++ b/views/controls/scrollbar/native_scroll_bar_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -200,15 +200,15 @@ NativeScrollBarWin::NativeScrollBarWin(NativeScrollBar* scroll_bar)
: native_scroll_bar_(scroll_bar),
sb_container_(NULL) {
set_focus_view(scroll_bar);
- memset(&scroll_info_, 0, sizeof(scroll_info_));
}
NativeScrollBarWin::~NativeScrollBarWin() {
- if (sb_container_.get()) {
+ if (sb_container_) {
// We always destroy the scrollbar container explicitly to cover all
// cases including when the container is no longer connected to a
// widget tree.
DestroyWindow(sb_container_->hwnd());
+ delete sb_container_;
}
}
@@ -227,7 +227,7 @@ gfx::Size NativeScrollBarWin::GetPreferredSize() {
}
bool NativeScrollBarWin::OnKeyPressed(const KeyEvent& event) {
- if (!sb_container_.get())
+ if (!sb_container_)
return false;
int code = -1;
switch (event.GetKeyCode()) {
@@ -270,7 +270,7 @@ bool NativeScrollBarWin::OnKeyPressed(const KeyEvent& event) {
}
bool NativeScrollBarWin::OnMouseWheel(const MouseWheelEvent& e) {
- if (!sb_container_.get())
+ if (!sb_container_)
return false;
sb_container_->ScrollWithOffset(e.GetOffset());
return true;
@@ -280,12 +280,8 @@ bool NativeScrollBarWin::OnMouseWheel(const MouseWheelEvent& e) {
// NativeScrollBarWin, NativeControlWin overrides:
void NativeScrollBarWin::CreateNativeControl() {
- sb_container_.reset(new ScrollBarContainer(native_scroll_bar_));
+ sb_container_ = new ScrollBarContainer(native_scroll_bar_);
NativeControlCreated(sb_container_->hwnd());
- // Reinstall scroll state if we have valid information.
- if (scroll_info_.cbSize)
- SetScrollInfo(sb_container_->GetScrollBarHWND(), SB_CTL, &scroll_info_,
- TRUE);
}
////////////////////////////////////////////////////////////////////////////////
@@ -306,7 +302,7 @@ View* NativeScrollBarWin::GetView() {
void NativeScrollBarWin::Update(int viewport_size,
int content_size,
int current_pos) {
- if (!sb_container_.get())
+ if (!sb_container_)
return;
if (content_size < 0)
@@ -318,13 +314,14 @@ void NativeScrollBarWin::Update(int viewport_size,
if (current_pos > content_size)
current_pos = content_size;
- scroll_info_.cbSize = sizeof(scroll_info_);
- scroll_info_.fMask = SIF_DISABLENOSCROLL | SIF_POS | SIF_RANGE | SIF_PAGE;
- scroll_info_.nMin = 0;
- scroll_info_.nMax = content_size;
- scroll_info_.nPos = current_pos;
- scroll_info_.nPage = viewport_size;
- SetScrollInfo(sb_container_->GetScrollBarHWND(), SB_CTL, &scroll_info_, TRUE);
+ SCROLLINFO si;
+ si.cbSize = sizeof(si);
+ si.fMask = SIF_DISABLENOSCROLL | SIF_POS | SIF_RANGE | SIF_PAGE;
+ si.nMin = 0;
+ si.nMax = content_size;
+ si.nPos = current_pos;
+ si.nPage = viewport_size;
+ SetScrollInfo(sb_container_->GetScrollBarHWND(), SB_CTL, &si, TRUE);
}
////////////////////////////////////////////////////////////////////////////////
@@ -347,3 +344,4 @@ int NativeScrollBarWrapper::GetVerticalScrollBarWidth() {
}
} // namespace views
+
diff --git a/views/controls/scrollbar/native_scroll_bar_win.h b/views/controls/scrollbar/native_scroll_bar_win.h
index ba7dc25..566f036 100644
--- a/views/controls/scrollbar/native_scroll_bar_win.h
+++ b/views/controls/scrollbar/native_scroll_bar_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -51,12 +51,7 @@ class NativeScrollBarWin : public NativeControlWin,
// sb_container_ is a custom hwnd that we use to wrap the real
// windows scrollbar. We need to do this to get the scroll events
// without having to do anything special in the high level hwnd.
- scoped_ptr<ScrollBarContainer> sb_container_;
-
- // Last scrollbar state we wrote to the scrollbar. We keep it here, so we can
- // reinitialize the scrollbar to its previous state in case it gets hidden and
- // recreated.
- SCROLLINFO scroll_info_;
+ ScrollBarContainer* sb_container_;
DISALLOW_COPY_AND_ASSIGN(NativeScrollBarWin);
};
@@ -64,3 +59,4 @@ class NativeScrollBarWin : public NativeControlWin,
} // namespace views
#endif // #ifndef VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_
+
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
index 25705fc..8900de3 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
+++ b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
@@ -75,11 +75,6 @@ View* NativeTabbedPaneGtk::RemoveTabAtIndex(int index) {
// widget delete itself when native_view is deleted.
gtk_notebook_remove_page(GTK_NOTEBOOK(native_view()), index);
- // Removing a tab might change the size of the tabbed pane.
- RootView* root_view = GetRootView();
- if (root_view)
- GetRootView()->Layout();
-
return removed_tab;
}
@@ -108,19 +103,6 @@ void NativeTabbedPaneGtk::SetFocus() {
Focus();
}
-gfx::Size NativeTabbedPaneGtk::GetPreferredSize() {
- if (!native_view())
- return gfx::Size();
-
- // For some strange reason (or maybe it's a bug), the requisition is not
- // returned in the passed requisition parameter, but instead written to the
- // widget's requisition field.
- GtkRequisition requisition = { 0, 0 };
- gtk_widget_size_request(GTK_WIDGET(native_view()), &requisition);
- GtkRequisition& size(GTK_WIDGET(native_view())->requisition);
- return gfx::Size(size.width, size.height);
-}
-
gfx::NativeView NativeTabbedPaneGtk::GetTestingHandle() const {
return native_view();
}
@@ -184,11 +166,6 @@ void NativeTabbedPaneGtk::DoAddTabAtIndex(int index, const std::wstring& title,
if (tab_count == 0 && select_if_first_tab)
gtk_notebook_set_current_page(GTK_NOTEBOOK(native_view()), 0);
-
- // Relayout the hierarchy, since the added tab might require more space.
- RootView* root_view = GetRootView();
- if (root_view)
- GetRootView()->Layout();
}
WidgetGtk* NativeTabbedPaneGtk::GetWidgetAt(int index) {
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_gtk.h b/views/controls/tabbed_pane/native_tabbed_pane_gtk.h
index 229faa5..d586e74 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_gtk.h
+++ b/views/controls/tabbed_pane/native_tabbed_pane_gtk.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -31,7 +31,6 @@ class NativeTabbedPaneGtk : public NativeControlGtk,
virtual View* GetSelectedTab();
virtual View* GetView();
virtual void SetFocus();
- virtual gfx::Size GetPreferredSize();
virtual gfx::NativeView GetTestingHandle() const;
// NativeControlGtk overrides.
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_win.cc b/views/controls/tabbed_pane/native_tabbed_pane_win.cc
index 838991f..388cb56 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_win.cc
+++ b/views/controls/tabbed_pane/native_tabbed_pane_win.cc
@@ -46,64 +46,12 @@ class TabBackground : public Background {
DISALLOW_COPY_AND_ASSIGN(TabBackground);
};
-// Custom layout manager that takes care of sizing and displaying the tab pages.
-class TabLayout : public LayoutManager {
- public:
- TabLayout() {}
-
- // Switches to the tab page identified by the given index.
- void SwitchToPage(View* host, View* page) {
- for (int i = 0; i < host->GetChildViewCount(); ++i) {
- View* child = host->GetChildViewAt(i);
- // The child might not have been laid out yet.
- if (child == page)
- child->SetBounds(gfx::Rect(host->size()));
- child->SetVisible(child == page);
- }
- }
-
- private:
- // LayoutManager overrides:
- virtual void Layout(View* host) {
- gfx::Rect bounds(host->size());
- for (int i = 0; i < host->GetChildViewCount(); ++i) {
- View* child = host->GetChildViewAt(i);
- // We only layout visible children, since it may be expensive.
- if (child->IsVisible() && child->bounds() != bounds)
- child->SetBounds(bounds);
- }
- }
-
- virtual gfx::Size GetPreferredSize(View* host) {
- // First, query the preferred sizes to determine a good width.
- int width = 0;
- for (int i = 0; i < host->GetChildViewCount(); ++i) {
- View* page = host->GetChildViewAt(i);
- width = std::max(width, page->GetPreferredSize().width());
- }
- // After we know the width, decide on the height.
- return gfx::Size(width, GetPreferredHeightForWidth(host, width));
- }
-
- virtual int GetPreferredHeightForWidth(View* host, int width) {
- int height = 0;
- for (int i = 0; i < host->GetChildViewCount(); ++i) {
- View* page = host->GetChildViewAt(i);
- height = std::max(height, page->GetHeightForWidth(width));
- }
- return height;
- }
-
- DISALLOW_COPY_AND_ASSIGN(TabLayout);
-};
-
////////////////////////////////////////////////////////////////////////////////
// NativeTabbedPaneWin, public:
NativeTabbedPaneWin::NativeTabbedPaneWin(TabbedPane* tabbed_pane)
: NativeControlWin(),
tabbed_pane_(tabbed_pane),
- tab_layout_manager_(NULL),
content_window_(NULL),
selected_index_(-1) {
// Associates the actual HWND with the tabbed-pane so the tabbed-pane is
@@ -129,32 +77,31 @@ void NativeTabbedPaneWin::AddTabAtIndex(int index, const std::wstring& title,
bool select_if_first_tab) {
DCHECK(index <= static_cast<int>(tab_views_.size()));
contents->set_parent_owned(false);
- contents->SetVisible(false);
tab_views_.insert(tab_views_.begin() + index, contents);
tab_titles_.insert(tab_titles_.begin() + index, title);
if (!contents->background())
contents->set_background(new TabBackground);
- if (tab_views_.size() == 1 && select_if_first_tab)
+ if (tab_views_.size() == 1 && select_if_first_tab) {
+ // If this is the only tab displayed, make sure the contents is set.
selected_index_ = 0;
+ if (content_window_)
+ content_window_->GetRootView()->AddChildView(contents);
+ }
// Add native tab only if the native control is alreay created.
if (content_window_) {
- AddNativeTab(index, title);
+ AddNativeTab(index, title, contents);
+
// The newly added tab may have made the contents window smaller.
ResizeContents();
-
- RootView* content_root = content_window_->GetRootView();
- content_root->AddChildView(contents);
- // Switch to the newly added tab if requested;
- if (tab_views_.size() == 1 && select_if_first_tab)
- tab_layout_manager_->SwitchToPage(content_root, contents);
}
}
void NativeTabbedPaneWin::AddNativeTab(int index,
- const std::wstring &title) {
+ const std::wstring &title,
+ views::View* contents) {
TCITEM tcitem;
tcitem.mask = TCIF_TEXT;
@@ -193,8 +140,6 @@ View* NativeTabbedPaneWin::RemoveTabAtIndex(int index) {
std::vector<View*>::iterator iter = tab_views_.begin() + index;
View* removed_tab = *iter;
- if (content_window_)
- content_window_->GetRootView()->RemoveChildView(removed_tab);
tab_views_.erase(iter);
tab_titles_.erase(tab_titles_.begin() + index);
@@ -231,17 +176,6 @@ void NativeTabbedPaneWin::SetFocus() {
Focus();
}
-gfx::Size NativeTabbedPaneWin::GetPreferredSize() {
- if (!native_view())
- return gfx::Size();
-
- gfx::Rect contentSize(content_window_->GetRootView()->GetPreferredSize());
- RECT paneSize = { 0, 0, contentSize.width(), contentSize.height() };
- TabCtrl_AdjustRect(native_view(), TRUE, &paneSize);
- return gfx::Size(paneSize.right - paneSize.left,
- paneSize.bottom - paneSize.top);
-}
-
gfx::NativeView NativeTabbedPaneWin::GetTestingHandle() const {
return native_view();
}
@@ -291,8 +225,7 @@ void NativeTabbedPaneWin::CreateNativeControl() {
l10n_util::HWNDSetRTLLayout(tab_control);
RootView* root_view = content_window_->GetRootView();
- tab_layout_manager_ = new TabLayout();
- root_view->SetLayoutManager(tab_layout_manager_);
+ root_view->SetLayoutManager(new FillLayout());
DWORD sys_color = ::GetSysColor(COLOR_3DHILIGHT);
SkColor color = SkColorSetRGB(GetRValue(sys_color), GetGValue(sys_color),
GetBValue(sys_color));
@@ -354,13 +287,9 @@ void NativeTabbedPaneWin::ViewHierarchyChanged(bool is_add,
// NativeTabbedPaneWin, private:
void NativeTabbedPaneWin::InitializeTabs() {
- for (size_t i = 0; i < tab_titles_.size(); ++i)
- AddNativeTab(i, tab_titles_[i]);
-
- RootView* content_root = content_window_->GetRootView();
- for (std::vector<View*>::iterator tab(tab_views_.begin());
- tab != tab_views_.end(); ++tab)
- content_root->AddChildView(*tab);
+ for (size_t i = 0; i < tab_views_.size(); ++i) {
+ AddNativeTab(i, tab_titles_[i], tab_views_[i]);
+ }
}
void NativeTabbedPaneWin::DoSelectTabAt(int index, boolean invoke_listener) {
@@ -374,7 +303,10 @@ void NativeTabbedPaneWin::DoSelectTabAt(int index, boolean invoke_listener) {
View* focused_view = focus_manager->GetFocusedView();
if (focused_view && content_root->IsParentOf(focused_view))
focus_manager->ClearFocus();
- tab_layout_manager_->SwitchToPage(content_root, tab_views_.at(index));
+
+ content_root->RemoveAllChildViews(false);
+ content_root->AddChildView(tab_views_[index]);
+ content_root->Layout();
}
if (invoke_listener && tabbed_pane_->listener())
tabbed_pane_->listener()->TabSelectedAt(index);
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_win.h b/views/controls/tabbed_pane/native_tabbed_pane_win.h
index 4e4cc2a..c3dcaed 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_win.h
+++ b/views/controls/tabbed_pane/native_tabbed_pane_win.h
@@ -13,7 +13,6 @@
namespace views {
class WidgetWin;
-class TabLayout;
class NativeTabbedPaneWin : public NativeControlWin,
public NativeTabbedPaneWrapper {
@@ -34,7 +33,6 @@ class NativeTabbedPaneWin : public NativeControlWin,
virtual View* GetSelectedTab();
virtual View* GetView();
virtual void SetFocus();
- virtual gfx::Size GetPreferredSize();
virtual gfx::NativeView GetTestingHandle() const;
// NativeControlWin overrides.
@@ -59,7 +57,7 @@ class NativeTabbedPaneWin : public NativeControlWin,
void InitializeTabs();
// Adds a tab with the given content to native control at the given index.
- void AddNativeTab(int index, const std::wstring& title);
+ void AddNativeTab(int index, const std::wstring& title, View* contents);
// Changes the contents view to the view associated with the tab at |index|.
// |invoke_listener| controls if this methold should invoke the
@@ -72,9 +70,6 @@ class NativeTabbedPaneWin : public NativeControlWin,
// The tabbed-pane we are bound to.
TabbedPane* tabbed_pane_;
- // The layout manager we use for managing our tabs.
- TabLayout* tab_layout_manager_;
-
// The views associated with the different tabs.
std::vector<View*> tab_views_;
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h b/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h
index 97c5fba..a051898 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h
+++ b/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -56,9 +56,6 @@ class NativeTabbedPaneWrapper {
// Sets the focus to the tabbed pane native view.
virtual void SetFocus() = 0;
- // Gets the preferred size of the tabbed pane.
- virtual gfx::Size GetPreferredSize() = 0;
-
// Returns a handle to the underlying native view for testing.
virtual gfx::NativeView GetTestingHandle() const = 0;
diff --git a/views/controls/tabbed_pane/tabbed_pane.cc b/views/controls/tabbed_pane/tabbed_pane.cc
index 1a7b0f0..5cb570a 100644
--- a/views/controls/tabbed_pane/tabbed_pane.cc
+++ b/views/controls/tabbed_pane/tabbed_pane.cc
@@ -102,8 +102,10 @@ void TabbedPane::LoadAccelerators() {
}
void TabbedPane::Layout() {
- if (native_tabbed_pane_)
+ if (native_tabbed_pane_) {
native_tabbed_pane_->GetView()->SetBounds(0, 0, width(), height());
+ native_tabbed_pane_->GetView()->Layout();
+ }
}
void TabbedPane::Focus() {
@@ -127,9 +129,4 @@ bool TabbedPane::GetAccessibleRole(AccessibilityTypes::Role* role) {
return true;
}
-gfx::Size TabbedPane::GetPreferredSize() {
- return native_tabbed_pane_ ?
- native_tabbed_pane_->GetPreferredSize() : gfx::Size();
-}
-
} // namespace views
diff --git a/views/controls/tabbed_pane/tabbed_pane.h b/views/controls/tabbed_pane/tabbed_pane.h
index 36026a0..2fe503e 100644
--- a/views/controls/tabbed_pane/tabbed_pane.h
+++ b/views/controls/tabbed_pane/tabbed_pane.h
@@ -13,6 +13,7 @@ class NativeTabbedPaneWrapper;
// The TabbedPane class is a view that shows tabs. When the user clicks on a
// tab, the associated view is displayed.
+// TODO (jcampan): implement GetPreferredSize().
class TabbedPane : public View {
public:
@@ -71,7 +72,6 @@ class TabbedPane : public View {
virtual void Focus();
virtual void PaintFocusBorder(gfx::Canvas* canvas);
virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
- virtual gfx::Size GetPreferredSize();
NativeTabbedPaneWrapper* native_wrapper() const {
return native_tabbed_pane_;
diff --git a/views/controls/tabbed_pane/tabbed_pane_unittest.cc b/views/controls/tabbed_pane/tabbed_pane_unittest.cc
deleted file mode 100644
index e0428f2..0000000
--- a/views/controls/tabbed_pane/tabbed_pane_unittest.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/message_loop.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "views/controls/tabbed_pane/tabbed_pane.h"
-#include "views/window/window.h"
-#include "views/window/window_delegate.h"
-
-namespace views {
-
-// A view for testing that takes a fixed preferred size upon construction.
-class FixedSizeView : public View {
- public:
- FixedSizeView(const gfx::Size& size)
- : size_(size) {}
-
- virtual gfx::Size GetPreferredSize() {
- return size_;
- }
-
- private:
- const gfx::Size size_;
-
- DISALLOW_COPY_AND_ASSIGN(FixedSizeView);
-};
-
-class TabbedPaneTest : public testing::Test, WindowDelegate {
- public:
- TabbedPaneTest() {}
-
- TabbedPane* tabbed_pane_;
-
- private:
- virtual void SetUp() {
- tabbed_pane_ = new TabbedPane();
- window_ = Window::CreateChromeWindow(NULL, gfx::Rect(0, 0, 100, 100), this);
- window_->Show();
- }
-
- virtual void TearDown() {
- window_->Close();
- }
-
- virtual views::View* GetContentsView() {
- return tabbed_pane_;
- }
-
- MessageLoopForUI message_loop_;
- Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(TabbedPaneTest);
-};
-
-// Tests that TabbedPane::GetPreferredSize() and TabbedPane::Layout().
-TEST_F(TabbedPaneTest, SizeAndLayout) {
- View* child1 = new FixedSizeView(gfx::Size(20, 10));
- tabbed_pane_->AddTab(L"tab1", child1);
- View* child2 = new FixedSizeView(gfx::Size(5, 5));
- tabbed_pane_->AddTab(L"tab2", child2);
- tabbed_pane_->SelectTabAt(0);
-
- // Check that the preferred size is larger than the largest child.
- gfx::Size pref(tabbed_pane_->GetPreferredSize());
- EXPECT_GT(pref.width(), 20);
- EXPECT_GT(pref.height(), 10);
-
- // The bounds of our children should be smaller than the tabbed pane's bounds.
- tabbed_pane_->SetBounds(0, 0, 100, 200);
- gfx::Rect bounds(child1->bounds());
- EXPECT_GT(bounds.width(), 0);
- EXPECT_LT(bounds.width(), 100);
- EXPECT_GT(bounds.height(), 0);
- EXPECT_LT(bounds.height(), 200);
-
- // If we switch to the other tab, it should get assigned the same bounds.
- tabbed_pane_->SelectTabAt(1);
- EXPECT_EQ(bounds, child2->bounds());
-}
-
-} // namespace views
diff --git a/views/controls/table/table_view.cc b/views/controls/table/table_view.cc
index 7ab4c91..8b86a6e 100644
--- a/views/controls/table/table_view.cc
+++ b/views/controls/table/table_view.cc
@@ -64,6 +64,7 @@ TableView::TableView(TableModel* model,
single_selection_(single_selection),
ignore_listview_change_(false),
custom_colors_enabled_(false),
+ sized_columns_(false),
autosize_columns_(autosize_columns),
resizable_columns_(resizable_columns),
list_view_(NULL),
@@ -132,8 +133,10 @@ void TableView::DidChangeBounds(const gfx::Rect& previous,
return;
SendMessage(list_view_, WM_SETREDRAW, static_cast<WPARAM>(FALSE), 0);
Layout();
- if (autosize_columns_ && width() > 0)
+ if ((!sized_columns_ || autosize_columns_) && width() > 0) {
+ sized_columns_ = true;
ResetColumnSizes();
+ }
UpdateContentOffset();
SendMessage(list_view_, WM_SETREDRAW, static_cast<WPARAM>(TRUE), 0);
}
@@ -1548,15 +1551,6 @@ gfx::Font TableView::GetAltTextFont() {
return ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont);
}
-void TableView::VisibilityChanged(View* starting_from, bool is_visible) {
- // GetClientRect as used by ResetColumnSize to obtain the total width
- // available to the columns only works when the native control is visible, so
- // update the column sizes in case we become visible. This depends on
- // VisibilityChanged() being called in post order on the view tree.
- if (is_visible && autosize_columns_)
- ResetColumnSizes();
-}
-
//
// TableSelectionIterator
diff --git a/views/controls/table/table_view.h b/views/controls/table/table_view.h
index 28d877e..f237df2 100644
--- a/views/controls/table/table_view.h
+++ b/views/controls/table/table_view.h
@@ -407,10 +407,6 @@ class TableView : public NativeControl,
// Returns the font used for alt text.
gfx::Font GetAltTextFont();
- // Overriden in order to update the column sizes, which can only be sized
- // accurately when the native control is available.
- virtual void VisibilityChanged(View* starting_from, bool is_visible);
-
TableModel* model_;
TableTypes table_type_;
TableViewObserver* table_view_observer_;
@@ -436,6 +432,10 @@ class TableView : public NativeControl,
// Reflects the value passed to SetCustomColorsEnabled.
bool custom_colors_enabled_;
+ // Whether or not the columns have been sized in the ListView. This is
+ // set to true the first time Layout() is invoked and we have a valid size.
+ bool sized_columns_;
+
// Whether or not columns should automatically be resized to fill the
// the available width when the list view is resized.
bool autosize_columns_;
diff --git a/views/examples/tabbed_pane_example.h b/views/examples/tabbed_pane_example.h
index 1b712a8..4b4bdfc 100644
--- a/views/examples/tabbed_pane_example.h
+++ b/views/examples/tabbed_pane_example.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -109,3 +109,4 @@ class TabbedPaneExample : public ExampleBase,
} // namespace examples
#endif // VIEWS_EXAMPLES_TABBED_PANE_EXAMPLE_H_
+
diff --git a/views/grid_layout.cc b/views/grid_layout.cc
index 5e685ac..b3f0625 100644
--- a/views/grid_layout.cc
+++ b/views/grid_layout.cc
@@ -844,26 +844,22 @@ void GridLayout::SizeRowsAndColumns(bool layout, int width, int height,
if (rows_.empty())
return;
- // Calculate the preferred width of each of the columns. Some views'
- // preferred heights are derived from their width, as such we need to
- // calculate the size of the columns first.
+ // Calculate the size of each of the columns. Some views preferred heights are
+ // derived from their width, as such we need to calculate the size of the
+ // columns first.
for (std::vector<ColumnSet*>::iterator i = column_sets_.begin();
i != column_sets_.end(); ++i) {
(*i)->CalculateSize();
+ if (layout || width > 0) {
+ // We're doing a layout, divy up any extra space.
+ (*i)->Resize(width - (*i)->LayoutWidth() - left_inset_ - right_inset_);
+ // And reset the x coordinates.
+ (*i)->ResetColumnXCoordinates();
+ }
pref->set_width(std::max(pref->width(), (*i)->LayoutWidth()));
}
pref->set_width(pref->width() + left_inset_ + right_inset_);
- // Go over the columns again and set them all to the size we settled for.
- width = width ? width : pref->width();
- for (std::vector<ColumnSet*>::iterator i = column_sets_.begin();
- i != column_sets_.end(); ++i) {
- // We're doing a layout, divy up any extra space.
- (*i)->Resize(width - (*i)->LayoutWidth() - left_inset_ - right_inset_);
- // And reset the x coordinates.
- (*i)->ResetColumnXCoordinates();
- }
-
// Reset the height of each row.
LayoutElement::ResetSizes(&rows_);
@@ -1067,3 +1063,4 @@ views::GridLayout* CreatePanelGridLayout(views::View* host) {
kPanelVertMargin, kPanelHorizMargin);
return layout;
}
+
diff --git a/views/grid_layout.h b/views/grid_layout.h
index bb882ad..6d6c61c 100644
--- a/views/grid_layout.h
+++ b/views/grid_layout.h
@@ -183,7 +183,8 @@ class GridLayout : public LayoutManager {
// they both call into this method. This sizes the Columns/Rows as
// appropriate. If layout is true, width/height give the width/height the
// of the host, otherwise they are ignored.
- void SizeRowsAndColumns(bool layout, int width, int height, gfx::Size* pref);
+ void SizeRowsAndColumns(bool layout, int width, int height,
+ gfx::Size* pref);
// Calculates the master columns of all the column sets. See Column for
// a description of what a master column is.
diff --git a/views/grid_layout_unittest.cc b/views/grid_layout_unittest.cc
index a70ae5f..c5e56fd 100644
--- a/views/grid_layout_unittest.cc
+++ b/views/grid_layout_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -32,25 +32,6 @@ class SettableSizeView : public View {
gfx::Size pref_;
};
-// A view with fixed circumference that trades height for width.
-class FlexibleView : public View {
- public:
- explicit FlexibleView(int circumference) {
- circumference_ = circumference;
- }
-
- virtual gfx::Size GetPreferredSize() {
- return gfx::Size(0, circumference_ / 2);
- }
-
- virtual int GetHeightForWidth(int width) {
- return std::max(0, circumference_ / 2 - width);
- }
-
- private:
- int circumference_;
-};
-
class GridLayoutTest : public testing::Test {
public:
virtual void SetUp() {
@@ -567,42 +548,3 @@ TEST_F(GridLayoutTest, ColumnSpanResizing) {
// 4 + (6 * 4 / 6).
ExpectViewBoundsEquals(4, 40, 8, 40, view2);
}
-
-// Check that GetPreferredSize() takes resizing of columns into account when
-// there is additional space in the case we have column sets of different
-// preferred sizes.
-TEST_F(GridLayoutTest, ColumnResizingOnGetPreferredSize) {
- views::ColumnSet* set = layout->AddColumnSet(0);
- set->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER,
- 1, views::GridLayout::USE_PREF, 0, 0);
-
- set = layout->AddColumnSet(1);
- set->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER,
- 1, views::GridLayout::USE_PREF, 0, 0);
-
- set = layout->AddColumnSet(2);
- set->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER,
- 1, views::GridLayout::USE_PREF, 0, 0);
-
- // Make a row containing a flexible view that trades width for height.
- layout->StartRow(0, 0);
- View* view1 = new FlexibleView(100);
- layout->AddView(view1, 1, 1, GridLayout::FILL, GridLayout::LEADING);
-
- // The second row contains a view of fixed size that will enforce a column
- // width of 20 pixels.
- layout->StartRow(0, 1);
- View* view2 = new SettableSizeView(gfx::Size(20, 20));
- layout->AddView(view2, 1, 1, GridLayout::FILL, GridLayout::LEADING);
-
- // Add another flexible view in row three in order to ensure column set
- // ordering doesn't influence sizing behaviour.
- layout->StartRow(0, 2);
- View* view3 = new FlexibleView(40);
- layout->AddView(view3, 1, 1, GridLayout::FILL, GridLayout::LEADING);
-
- // We expect a height of 50: 30 from the variable width view in the first row
- // plus 20 from the statically sized view in the second row. The flexible
- // view in the third row should contribute no height.
- EXPECT_EQ(gfx::Size(20, 50), layout->GetPreferredSize(&host));
-}
diff --git a/views/view.cc b/views/view.cc
index 22b048b..90fb2bc 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -218,14 +218,17 @@ void View::ScrollRectToVisible(const gfx::Rect& rect) {
/////////////////////////////////////////////////////////////////////////////
void View::Layout() {
- // If we have a layout manager, let it handle the layout for us.
+ // Layout child Views
if (layout_manager_.get()) {
layout_manager_->Layout(this);
SchedulePaint();
- return;
+ // TODO(beng): We believe the right thing to do here is return since the
+ // layout manager should be handling things, but it causes
+ // regressions (missing options from Options dialog and a hang
+ // in interactive_ui_tests).
}
- // Otherwise, just pass on to the child views.
+ // Lay out contents of child Views
for (int i = 0, count = GetChildViewCount(); i < count; ++i) {
View* child = GetChildViewAt(i);
child->Layout();
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index c9144d7..1e73e38 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -500,8 +500,6 @@ void WidgetGtk::Init(GtkWidget* parent,
GDK_KEY_RELEASE_MASK);
SetRootViewForWidget(widget_, root_view_.get());
- g_signal_connect_after(G_OBJECT(window_contents_), "size_request",
- G_CALLBACK(&OnSizeRequestThunk), this);
g_signal_connect_after(G_OBJECT(window_contents_), "size_allocate",
G_CALLBACK(&OnSizeAllocateThunk), this);
gtk_widget_set_app_paintable(window_contents_, true);
@@ -885,18 +883,6 @@ int WidgetGtk::GetFlagsForEventButton(const GdkEventButton& event) {
return flags;
}
-void WidgetGtk::OnSizeRequest(GtkWidget* widget, GtkRequisition* requisition) {
- // Do only return the preferred size for child windows. GtkWindow interprets
- // the requisition as a minimum size for top level windows, returning a
- // preferred size for these would prevents us from setting smaller window
- // sizes.
- if (type_ == TYPE_CHILD) {
- gfx::Size size(root_view_->GetPreferredSize());
- requisition->width = size.width();
- requisition->height = size.height();
- }
-}
-
void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) {
// See comment next to size_ as to why we do this. Also note, it's tempting
// to put this in the static method so subclasses don't need to worry about
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index 3700aa3..816a263 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -223,7 +223,6 @@ class WidgetGtk
// Event handlers:
CHROMEGTK_CALLBACK_1(WidgetGtk, gboolean, OnButtonPress, GdkEventButton*);
- CHROMEGTK_CALLBACK_1(WidgetGtk, void, OnSizeRequest, GtkRequisition*);
CHROMEGTK_CALLBACK_1(WidgetGtk, void, OnSizeAllocate, GtkAllocation*);
CHROMEGTK_CALLBACK_1(WidgetGtk, gboolean, OnPaint, GdkEventExpose*);
CHROMEGTK_CALLBACK_4(WidgetGtk, void, OnDragDataGet,